Class: Slackened::BlockKit::Blocks::Custom
- Defined in:
- lib/slackened/block_kit/blocks/custom.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(block) ⇒ Custom
constructor
A new instance of Custom.
- #to_h ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(block) ⇒ Custom
Returns a new instance of Custom.
10 11 12 13 14 15 16 |
# File 'lib/slackened/block_kit/blocks/custom.rb', line 10 def initialize(block) raise MustBeHash unless block.is_a? Hash set(block) self end |
Instance Method Details
#to_h ⇒ Object
18 19 20 |
# File 'lib/slackened/block_kit/blocks/custom.rb', line 18 def to_h @block.to_h end |