Sha256: 8fe229ba4fd704834fd968b29576519fb65abdad55a686887a98aa4d35910e38

Contents?: true

Size: 308 Bytes

Versions: 7

Compression:

Stored size: 308 Bytes

Contents

# frozen_string_literal: true

class TypeCaster
  include Arstotzka

  expose :age,     type: :integer, json: :@hash
  expose :payload, type: :string, json: :@hash
  expose :price,   type: :float, json: :@hash
  expose :type,    type: :symbol, json: :@hash

  def initialize(hash)
    @hash = hash
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
arstotzka-1.6.2 spec/support/models/type_caster.rb
arstotzka-1.6.1 spec/support/models/type_caster.rb
arstotzka-1.6.0 spec/support/models/type_caster.rb
arstotzka-1.5.0 spec/support/models/type_caster.rb
arstotzka-1.4.4 spec/support/models/type_caster.rb
arstotzka-1.4.3 spec/support/models/type_caster.rb
arstotzka-1.4.2 spec/support/models/type_caster.rb