Module: Paramore::BigDecimal

Defined in:
lib/paramore/types.rb

Class Method Summary collapse

Class Method Details

.[](input) ⇒ Object



9
10
11
12
13
# File 'lib/paramore/types.rb', line 9

def [](input)
  raise ArgumentError "#{input} is not a BigDecimal!" unless input.to_s.match?(TypeRegexes::FLOAT_REGEX)

  BigDecimal(input)
end