Class: BBLib::OptsParser::ElementOf
- Inherits:
-
BasicOption
- Object
- Option
- BasicOption
- BBLib::OptsParser::ElementOf
- Defined in:
- lib/bblib/cli/options/element_of.rb
Instance Method Summary collapse
Methods inherited from BasicOption
Methods inherited from Option
#flag_match?, #multi_value?, #retrieve, #split, #to_s, types, #valid!
Methods included from TypeInit
Methods included from Effortless
Instance Method Details
#valid?(value) ⇒ Boolean
8 9 10 11 12 13 14 |
# File 'lib/bblib/cli/options/element_of.rb', line 8 def valid?(value) return false unless .any? { |opt| comparitor.call(opt, value) } return true if validators.empty? validators.all? do |validator| validator.call(value) end end |