Class: Veto::ValidateBlock

Inherits:
ConditionalBlock show all
Defined in:
lib/veto/blocks/validate_block.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ConditionalBlock

#call, #options

Methods inherited from Block

#<<, #call, #children

Constructor Details

#initialize(method_name, options = {}) ⇒ ValidateBlock

Returns a new instance of ValidateBlock.



9
10
11
12
# File 'lib/veto/blocks/validate_block.rb', line 9

def initialize(method_name, options={})
  @method_name = method_name
  super(options)
end

Class Method Details

.build(*args) ⇒ Object



3
4
5
6
7
# File 'lib/veto/blocks/validate_block.rb', line 3

def self.build(*args)
  block = new(*args)
  block << MethodCheck.new(block.method_name)
  block
end

Instance Method Details

#method_nameObject



14
15
16
# File 'lib/veto/blocks/validate_block.rb', line 14

def method_name
  @method_name
end