class HammerCLI::Validator::AnyConstraint
Public Class Methods
new(options, to_check)
click to toggle source
Calls superclass method
HammerCLI::Validator::BaseConstraint.new
# File lib/hammer_cli/validator.rb, line 77 def initialize(options, to_check) super(options, to_check) @rejected_msg = _("You can't set any of options %s") @required_msg = _("At least one of options %s is required") end
Public Instance Methods
exist?()
click to toggle source
# File lib/hammer_cli/validator.rb, line 83 def exist? @to_check.each do |opt| return true if option_passed?(opt) end return @to_check.empty? end