Class: MLB::GameDateTime
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- MLB::GameDateTime
- Defined in:
- lib/mlb/game_data.rb
Overview
Represents game date/time information
Constant Summary collapse
- DAY =
Day game indicator value
"day".freeze
- NIGHT =
Night game indicator value
"night".freeze
- AM =
AM indicator value
"AM".freeze
- PM =
PM indicator value
"PM".freeze
Instance Attribute Summary collapse
-
#am_pm ⇒ String
Returns AM or PM indicator.
-
#date_time ⇒ String
Returns the game date and time.
-
#day_night ⇒ String
Returns day or night game indicator.
-
#original_date ⇒ String
Returns the original scheduled date.
-
#time ⇒ String
Returns the game time.
Instance Method Summary collapse
-
#am? ⇒ Boolean
Returns whether this game starts in the morning (AM).
-
#day? ⇒ Boolean
Returns whether this is a day game.
-
#night? ⇒ Boolean
Returns whether this is a night game.
-
#pm? ⇒ Boolean
Returns whether this game starts in the afternoon/evening (PM).
Instance Attribute Details
#am_pm ⇒ String
Returns AM or PM indicator
47 |
# File 'lib/mlb/game_data.rb', line 47 attribute :am_pm, Shale::Type::String |
#date_time ⇒ String
Returns the game date and time
15 |
# File 'lib/mlb/game_data.rb', line 15 attribute :date_time, Shale::Type::String |
#day_night ⇒ String
Returns day or night game indicator
31 |
# File 'lib/mlb/game_data.rb', line 31 attribute :day_night, Shale::Type::String |
#original_date ⇒ String
Returns the original scheduled date
23 |
# File 'lib/mlb/game_data.rb', line 23 attribute :original_date, Shale::Type::String |
#time ⇒ String
Returns the game time
39 |
# File 'lib/mlb/game_data.rb', line 39 attribute :time, Shale::Type::String |
Instance Method Details
#am? ⇒ Boolean
Returns whether this game starts in the morning (AM)
80 |
# File 'lib/mlb/game_data.rb', line 80 def am? = am_pm.eql?(AM) |
#day? ⇒ Boolean
Returns whether this is a day game
64 |
# File 'lib/mlb/game_data.rb', line 64 def day? = day_night.eql?(DAY) |
#night? ⇒ Boolean
Returns whether this is a night game
72 |
# File 'lib/mlb/game_data.rb', line 72 def night? = day_night.eql?(NIGHT) |
#pm? ⇒ Boolean
Returns whether this game starts in the afternoon/evening (PM)
88 |
# File 'lib/mlb/game_data.rb', line 88 def pm? = am_pm.eql?(PM) |