lib/dtn/lookups/symbol/by_filter.rb
def validate_filter_value(value, filter_type)
          catalog = filter_type.to_s == "e" ? Dtn.listed_markets_catalog : Dtn.security_types_catalog
          v = value.is_a?(Array) ? value : value.to_s.split.map(&:to_i)
          v.each { |el| catalog.registered?(el) || raise("Missing #{el} in #{catalog.name} catalog") }
          value
        end
# it assume that filter type was already validated
it assume that filter type was already validated
it assume that filter type was already validated
def validate_filter_value(value, filter_type)
          catalog = filter_type.to_s == "e" ? Dtn.listed_markets_catalog : Dtn.security_types_catalog
          v = value.is_a?(Array) ? value : value.to_s.split.map(&:to_i)
          v.each { |el| catalog.registered?(el) || raise("Missing #{el} in #{catalog.name} catalog") }
          value
        end
def validate_filter_value ( value , filter_type ) catalog = filter_type . to_s == "e" ? Dtn . listed_markets_catalog : Dtn . security_types_catalog v = value . is_a? ( Array ) ? value : value . to_s . split . map ( & :to_i ) v . each { | el | catalog . registered? ( el ) || raise ( "Missing #{el} in #{catalog.name} catalog" ) } value end
it assume that filter type was already validated
it assume that filter type was already validated
value
filter_type