class BBLib::OptsParser::ElementOf
Public Instance Methods
valid?(value)
click to toggle source
# File lib/bblib/cli/options/element_of.rb, line 8 def valid?(value) return false unless options.any? { |opt| comparitor.call(opt, value) } return true if validators.empty? validators.all? do |validator| validator.call(value) end end
Protected Instance Methods
format_value(value)
click to toggle source
# File lib/bblib/cli/options/element_of.rb, line 18 def format_value(value) value.to_s end