Class: Lucie::Validators::MandatoryOption::Validator

Inherits:
Base
  • Object
show all
Defined in:
lib/lucie/validators/mandatory_option.rb

Instance Method Summary collapse

Methods inherited from Base

#description, #initialize, #long_option, #short_option

Constructor Details

This class inherits a constructor from Lucie::Validators::Base

Instance Method Details

#apply(params) ⇒ Object



6
7
8
# File 'lib/lucie/validators/mandatory_option.rb', line 6

def apply(params)
  fail RequestError.new(self) unless params[:"#{short_option.gsub(/^-*/, '')}"]
end