Class: Veto::ValidateBlock
- Inherits:
-
ConditionalBlock
- Object
- Block
- ConditionalBlock
- Veto::ValidateBlock
- Defined in:
- lib/veto/blocks/validate_block.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(method_name, options = {}) ⇒ ValidateBlock
constructor
A new instance of ValidateBlock.
- #method_name ⇒ Object
Methods inherited from ConditionalBlock
Methods inherited from Block
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, ={}) @method_name = method_name super() 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_name ⇒ Object
14 15 16 |
# File 'lib/veto/blocks/validate_block.rb', line 14 def method_name @method_name end |