class CTioga2::MetaBuilder::Types::PartialFloatRangeType

Returns a [ start, end ] array where elements are either Float or nil.

Constants

RANGE_RE

Public Instance Methods

string_to_type_internal(str) click to toggle source
# File lib/ctioga2/metabuilder/types/numbers.rb, line 79
def string_to_type_internal(str)
  raise IncorrectInput, "'#{str}' is not a valid range" unless 
    str =~ RANGE_RE
  s,e = ($1 ? Float($1) : nil), ($2 ? Float($2) : nil)
  return [s, e]
end
type_to_string_internal(value) click to toggle source
# File lib/ctioga2/metabuilder/types/numbers.rb, line 86
def type_to_string_internal(value)
  return "#{value.first.to_s}:#{value.last.to_s}"
end