Class: Veto::Block

Inherits:
Object
  • Object
show all
Defined in:
lib/veto/blocks/block.rb

Direct Known Subclasses

Checker, ConditionalBlock

Instance Method Summary collapse

Constructor Details

#initializeBlock

Returns a new instance of Block.



3
4
5
# File 'lib/veto/blocks/block.rb', line 3

def initialize
  @children = []
end

Instance Method Details

#<<(child) ⇒ Object



11
12
13
# File 'lib/veto/blocks/block.rb', line 11

def <<(child)
  @children << child
end

#call(*args) ⇒ Object



7
8
9
# File 'lib/veto/blocks/block.rb', line 7

def call(*args)
  call_children(*args)
end

#childrenObject



15
16
17
# File 'lib/veto/blocks/block.rb', line 15

def children
  @children
end