Class: Sportradar::Api::Baseball::Fielder
- Defined in:
- lib/sportradar/api/baseball/fielder.rb
Instance Attribute Summary collapse
-
#ending_base ⇒ Object
Returns the value of attribute ending_base.
-
#id ⇒ Object
Returns the value of attribute id.
-
#out ⇒ Object
Returns the value of attribute out.
-
#outcome_id ⇒ Object
Returns the value of attribute outcome_id.
-
#response ⇒ Object
Returns the value of attribute response.
-
#starting_base ⇒ Object
Returns the value of attribute starting_base.
Instance Method Summary collapse
-
#initialize(data, **opts) ⇒ Fielder
constructor
A new instance of Fielder.
- #update(data, **opts) ⇒ Object
Methods inherited from Data
#all_attributes, #attributes, #create_data, #parse_into_array, #parse_into_array_with_options, #parse_out_hashes, #structure_links, #update_data
Constructor Details
#initialize(data, **opts) ⇒ Fielder
Returns a new instance of Fielder.
7 8 9 10 11 12 |
# File 'lib/sportradar/api/baseball/fielder.rb', line 7 def initialize(data, **opts) @response = data # @game = opts[:game] update(data) end |
Instance Attribute Details
#ending_base ⇒ Object
Returns the value of attribute ending_base.
5 6 7 |
# File 'lib/sportradar/api/baseball/fielder.rb', line 5 def ending_base @ending_base end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/sportradar/api/baseball/fielder.rb', line 5 def id @id end |
#out ⇒ Object
Returns the value of attribute out.
5 6 7 |
# File 'lib/sportradar/api/baseball/fielder.rb', line 5 def out @out end |
#outcome_id ⇒ Object
Returns the value of attribute outcome_id.
5 6 7 |
# File 'lib/sportradar/api/baseball/fielder.rb', line 5 def outcome_id @outcome_id end |
#response ⇒ Object
Returns the value of attribute response.
5 6 7 |
# File 'lib/sportradar/api/baseball/fielder.rb', line 5 def response @response end |
#starting_base ⇒ Object
Returns the value of attribute starting_base.
5 6 7 |
# File 'lib/sportradar/api/baseball/fielder.rb', line 5 def starting_base @starting_base end |
Instance Method Details
#update(data, **opts) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/sportradar/api/baseball/fielder.rb', line 13 def update(data, **opts) @id = data["id"] @type = data["type"] @sequence = data["sequence"] @last_name = data["last_name"] @first_name = data["first_name"] @preferred_name = data["preferred_name"] @jersey_number = data["jersey_number"] end |