Class: Decimal

Inherits:
BigDecimal
  • Object
show all
Extended by:
ActiveFacts::API::ValueClass
Defined in:
lib/activefacts/api/standard_types.rb

Overview

:nodoc:

Class Method Summary collapse

Methods included from ActiveFacts::API::ValueClass

value_type

Class Method Details

.new(v) ⇒ Object

The problem here is you can’t pass a BigDecimal to BigDecimal.new. Fix it.



60
61
62
63
64
65
66
# File 'lib/activefacts/api/standard_types.rb', line 60

def self.new(v)
  if v.is_a?(BigDecimal)
    super(v.to_s)
  else
    super
  end
end