Class: Slackened::BlockKit::Blocks::Custom

Inherits:
Base
  • Object
show all
Defined in:
lib/slackened/block_kit/blocks/custom.rb

Instance Attribute Summary

Attributes inherited from Base

#block

Instance Method Summary collapse

Methods inherited from Base

#set

Constructor Details

#initialize(block) ⇒ Custom

Returns a new instance of Custom.

Raises:



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_hObject



18
19
20
# File 'lib/slackened/block_kit/blocks/custom.rb', line 18

def to_h
	@block.to_h
end