Class: HammerCLI::Options::Validators::DSLBlockValidator

Inherits:
Base show all
Defined in:
lib/hammer_cli/options/validators/dsl_block_validator.rb

Instance Method Summary collapse

Methods inherited from Base

#process

Methods inherited from OptionProcessor

#name, #process

Constructor Details

#initialize(&block) ⇒ DSLBlockValidator

Returns a new instance of DSLBlockValidator.



8
9
10
# File 'lib/hammer_cli/options/validators/dsl_block_validator.rb', line 8

def initialize(&block)
  @validation_block = block
end

Instance Method Details

#run(options, option_values) ⇒ Object



12
13
14
15
# File 'lib/hammer_cli/options/validators/dsl_block_validator.rb', line 12

def run(options, option_values)
  dsl = DSL.new(options, option_values)
  dsl.run(&@validation_block)
end