Sha256: 4b214d19940306e6ae5c036827cb7c9300de3f0428e6544b63cb320e84e26cbb

Contents?: true

Size: 503 Bytes

Versions: 1

Compression:

Stored size: 503 Bytes

Contents

module NpbResult
  class Game
    attr_reader :away_team, :away_score, :home_team, :home_score, :status, :start_time

    def initialize(away_team, away_score, home_team, home_score, status, start_time)
      @away_team = away_team
      @away_score = away_score
      @home_team = home_team
      @home_score = home_score
      @status = status
      @start_time = start_time
    end

    def display
      "【#{status}】#{away_team} (#{away_score}) - (#{home_score}) #{home_team}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
npb_result-0.1.1 lib/npb_result/game.rb