Core Types
This page documents the Ruby API for core types. Values use keyword-only construction, validate before freezing, and serialize to Slack JSON.
Slackblocks
The gem namespace and its version constants.
| Constant | Slack value | Meaning |
|---|---|---|
VERSION | 2.5.0 | Coordinated package version. |
SPEC_VERSION | 1.2.0 | Shared contract version. |
Value
Shared immutable value protocol used by every Slackblocks value.
additional_fields
Return frozen extension fields.
def additional_fields: () -> Hash[String, untyped]
with
Return a validated value with changed keywords.
def with: (**untyped changes) -> self
==
Compare values structurally.
def ==: (untyped other) -> bool
eql?
Compare values structurally for Hash keys.
def eql?: (untyped other) -> bool
hash
Return a structural hash for Hash keys.
def hash: () -> Integer
to_h
Return structural Ruby members.
def to_h: () -> Hash[Symbol, untyped]
as_json
Return a detached wire Hash.
def as_json: (?untyped options) -> Hash[String, untyped]
to_json
Return Slack JSON.
def to_json: (?untyped options) -> String