Class: MLB::DerbyBatter
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- MLB::DerbyBatter
- Defined in:
- lib/mlb/home_run_derby.rb
Overview
Represents a batter’s derby performance
Instance Attribute Summary collapse
-
#full_name ⇒ String
Returns the player’s full name.
-
#hits ⇒ Array<DerbyHomeRun>
Returns the home run details.
-
#home_runs ⇒ Integer
Returns the number of home runs.
-
#id ⇒ Integer
Returns the player ID.
-
#is_bonus ⇒ Boolean
Returns whether batter earned bonus time.
-
#is_winner ⇒ Boolean
Returns whether this batter won their matchup.
-
#link ⇒ String
Returns the API link to the player.
-
#seed ⇒ Integer
Returns the batter’s seed.
Instance Method Summary collapse
-
#bonus? ⇒ Boolean
Returns whether this batter earned bonus time.
-
#winner? ⇒ Boolean
Returns whether this batter won their matchup.
Instance Attribute Details
#full_name ⇒ String
Returns the player’s full name
75 |
# File 'lib/mlb/home_run_derby.rb', line 75 attribute :full_name, Shale::Type::String |
#hits ⇒ Array<DerbyHomeRun>
Returns the home run details
123 |
# File 'lib/mlb/home_run_derby.rb', line 123 attribute :hits, DerbyHomeRun, collection: true |
#home_runs ⇒ Integer
Returns the number of home runs
99 |
# File 'lib/mlb/home_run_derby.rb', line 99 attribute :home_runs, Shale::Type::Integer |
#id ⇒ Integer
Returns the player ID
67 |
# File 'lib/mlb/home_run_derby.rb', line 67 attribute :id, Shale::Type::Integer |
#is_bonus ⇒ Boolean
Returns whether batter earned bonus time
115 |
# File 'lib/mlb/home_run_derby.rb', line 115 attribute :is_bonus, Shale::Type::Boolean |
#is_winner ⇒ Boolean
Returns whether this batter won their matchup
107 |
# File 'lib/mlb/home_run_derby.rb', line 107 attribute :is_winner, Shale::Type::Boolean |
#link ⇒ String
Returns the API link to the player
83 |
# File 'lib/mlb/home_run_derby.rb', line 83 attribute :link, Shale::Type::String |
#seed ⇒ Integer
Returns the batter’s seed
91 |
# File 'lib/mlb/home_run_derby.rb', line 91 attribute :seed, Shale::Type::Integer |
Instance Method Details
#bonus? ⇒ Boolean
Returns whether this batter earned bonus time
141 142 143 |
# File 'lib/mlb/home_run_derby.rb', line 141 def bonus? is_bonus end |
#winner? ⇒ Boolean
Returns whether this batter won their matchup
131 132 133 |
# File 'lib/mlb/home_run_derby.rb', line 131 def winner? is_winner end |