Sha256: b52ed13f364e8c62ba0c8f2545c59995c7f016be81e3aa7af67ad262c827535e

Contents?: true

Size: 261 Bytes

Versions: 12

Compression:

Stored size: 261 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

  def initialize(hash)
    @hash = hash
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
arstotzka-1.4.1 spec/support/models/type_caster.rb
arstotzka-1.4.0 spec/support/models/type_caster.rb
arstotzka-1.3.2 spec/support/models/type_caster.rb
arstotzka-1.3.1 spec/support/models/type_caster.rb
arstotzka-1.3.0 spec/support/models/type_caster.rb
arstotzka-1.2.4 spec/support/models/type_caster.rb
arstotzka-1.2.3 spec/support/models/type_caster.rb
arstotzka-1.2.2 spec/support/models/type_caster.rb
arstotzka-1.2.1 spec/support/models/type_caster.rb
arstotzka-1.2.0 spec/support/models/type_caster.rb
arstotzka-1.1.0 spec/support/models/type_caster.rb
arstotzka-1.0.4 spec/support/models/type_caster.rb