Sha256: 77c274107f36208a20ecd53c8533fc2ec26cbce99be8b0504e2e550a847f9399

Contents?: true

Size: 392 Bytes

Versions: 14

Compression:

Stored size: 392 Bytes

Contents

# frozen_string_literal: true

class Collector
  class Game
    include Arstotzka

    attr_reader :json

    expose :name
    expose :played, type: :float

    def initialize(json)
      @json = json
    end

    def ==(other)
      return false if other.class != self.class
      name == other.name && played == other.played
    end

    def finished?
      played > 85.0
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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