Sha256: 73c7e4d82de089ee39b8ed28ed9e0523574eb115cec46d6c47b634d3cef049c0
Contents?: true
Size: 674 Bytes
Versions: 20
Compression:
Stored size: 674 Bytes
Contents
module Virtus class Attribute # Float # # @example # class ExchangeRate # include Virtus # # attribute :dollar, Float # end # # ExchangeRate.new(:dollar => 2.69) # # # typecasting from a string # ExchangeRate.new(:dollar => '2.69') # # # typecasting from an integer # ExchangeRate.new(:dollar => 2) # # # typecasting from an object which implements #to_f # ExchangeRate.new(:dollar => BigDecimal.new('2.69') # class Float < Numeric primitive ::Float coercion_method :to_float end # class Float end # class Attribute end # module Virtus
Version data entries
20 entries across 20 versions & 3 rubygems