Sha256: 0ba8f8a5710fa5470b550ba051771b0fd65173ce71ea1715199e72e2f6406eed

Contents?: true

Size: 458 Bytes

Versions: 3

Compression:

Stored size: 458 Bytes

Contents

module Acfs::Resource::Attributes

  # @api public
  #
  # Float attribute type. Use it in your model as an attribute type:
  #
  # @example
  #   class User < Acfs::Resource
  #     attribute :name, :float
  #   end
  #
  class Float < Base

    # @api public
    #
    # Cast given object to float.
    #
    # @param [Object] obj Object to cast.
    # @return [Float] Casted object as float.
    #
    def cast_type(obj)
      Float obj
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
acfs-1.0.0.dev.1.b305 lib/acfs/resource/attributes/float.rb
acfs-1.0.0.dev.1.b298 lib/acfs/resource/attributes/float.rb
acfs-1.0.0.dev.1.b297 lib/acfs/resource/attributes/float.rb