module NumberMuncher

Constants

VERSION

Public Class Methods

parse(str) click to toggle source
# File lib/number_muncher.rb, line 17
def self.parse(str)
  Numeric.new(str)
end
scan(str) click to toggle source
# File lib/number_muncher.rb, line 21
def self.scan(str)
  Tokenizer.new(str).tokenize
end
to_fraction(value, round_to: nil, **opts) click to toggle source
# File lib/number_muncher.rb, line 25
def self.to_fraction(value, round_to: nil, **opts)
  parse(value).round(round_to).to_fraction(**opts)
end