Method: Flt::FormatBase.from_text

Defined in:
lib/float-formats/classes.rb

.from_text(txt, *args) ⇒ Object



852
853
854
855
856
857
858
859
860
# File 'lib/float-formats/classes.rb', line 852

def self.from_text(txt, *args)
  if @normalized
    fmt = Numerals::Format[exact_input: true]
  else
    fmt = Numerals::Format[:short, exact_input: false]
  end
  fmt = fmt[*args]
  fmt.read(txt, type: self)
end