Sha256: f2b12d71339e4bb7c2ebcebef3a6e9ad989ef41aebb79bdd65e18e77d1a782c0

Contents?: true

Size: 393 Bytes

Versions: 6

Compression:

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

6 entries across 6 versions & 1 rubygems

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