Sha256: e9cf2a65b042e51b578a625c3db90926a3b818cdee3ab18434da865ff82170f2

Contents?: true

Size: 313 Bytes

Versions: 16

Compression:

Stored size: 313 Bytes

Contents

# frozen_string_literal: true

class Bar
  include Arstotzka

  expose :drinks, type: :symbolized_hash,
                  klass: Drink, after_each: :add_inflation

  def initialize(json)
    @json = json
  end

  private

  attr_reader :json

  def add_inflation(drink)
    drink.inflate(0.1)
    drink
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
arstotzka-1.6.2 spec/support/models/bar.rb
arstotzka-1.6.1 spec/support/models/bar.rb
arstotzka-1.6.0 spec/support/models/bar.rb
arstotzka-1.5.0 spec/support/models/bar.rb
arstotzka-1.4.4 spec/support/models/bar.rb
arstotzka-1.4.3 spec/support/models/bar.rb
arstotzka-1.4.2 spec/support/models/bar.rb
arstotzka-1.4.1 spec/support/models/bar.rb
arstotzka-1.4.0 spec/support/models/bar.rb
arstotzka-1.3.2 spec/support/models/bar.rb
arstotzka-1.3.1 spec/support/models/bar.rb
arstotzka-1.3.0 spec/support/models/bar.rb
arstotzka-1.2.4 spec/support/models/bar.rb
arstotzka-1.2.3 spec/support/models/bar.rb
arstotzka-1.2.2 spec/support/models/bar.rb
arstotzka-1.2.1 spec/support/models/bar.rb