Sha256: f9f959d0913a036f72bd3569288d53ea740559f6b0ee75cf7691c9df6a9ccd5b

Contents?: true

Size: 399 Bytes

Versions: 18

Compression:

Stored size: 399 Bytes

Contents

module Virtus
  class Attribute

    # Decimal
    #
    # @example
    #   class ExchangeRate
    #     include Virtus
    #
    #     attribute :dollar, Decimal
    #   end
    #
    #   ExchangeRate.new(:dollar => '2.6948')
    #
    class Decimal < Numeric
      primitive       ::BigDecimal
      coercion_method :to_decimal

    end # class Decimal
  end # class Attribute
end # module Virtus

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
virtus-0.5.5 lib/virtus/attribute/decimal.rb
virtus-0.5.4 lib/virtus/attribute/decimal.rb
virtus-0.5.3 lib/virtus/attribute/decimal.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/virtus-0.5.2/lib/virtus/attribute/decimal.rb
virtus-0.5.2 lib/virtus/attribute/decimal.rb
virtus-0.5.1 lib/virtus/attribute/decimal.rb
virtus-0.5.0 lib/virtus/attribute/decimal.rb
virtus-0.4.2 lib/virtus/attribute/decimal.rb
virtus-0.4.1 lib/virtus/attribute/decimal.rb
virtus-0.4.0 lib/virtus/attribute/decimal.rb
virtus-0.3.0 lib/virtus/attribute/decimal.rb
virtus-0.2.0 lib/virtus/attribute/decimal.rb
virtus-0.1.0 lib/virtus/attribute/decimal.rb
virtus-0.0.10 lib/virtus/attribute/decimal.rb
virtus-0.0.9 lib/virtus/attribute/decimal.rb
virtus-0.0.8 lib/virtus/attribute/decimal.rb
virtus-0.0.7 lib/virtus/attribute/decimal.rb
virtus-0.0.6 lib/virtus/attribute/decimal.rb