Class: Slackened::BlockKit::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/slackened/block_kit/builder.rb

Overview

where the blocks are stored

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBuilder

Returns a new instance of Builder.



9
10
11
# File 'lib/slackened/block_kit/builder.rb', line 9

def initialize
	setup!
end

Instance Attribute Details

#blocksObject

Returns the value of attribute blocks.



7
8
9
# File 'lib/slackened/block_kit/builder.rb', line 7

def blocks
  @blocks
end

Instance Method Details

#row(row) ⇒ Object



13
14
15
# File 'lib/slackened/block_kit/builder.rb', line 13

def row(row)
	blocks.push(row)
end

#setup!Object



17
18
19
# File 'lib/slackened/block_kit/builder.rb', line 17

def setup!
	@blocks = []
end