Class: Sportradar::Api::Baseball::Error
- Defined in:
- lib/sportradar/api/baseball/error.rb
Instance Attribute Summary collapse
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#jersey_number ⇒ Object
Returns the value of attribute jersey_number.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#preferred_name ⇒ Object
Returns the value of attribute preferred_name.
-
#response ⇒ Object
Returns the value of attribute response.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data, **opts) ⇒ Error
constructor
A new instance of Error.
- #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) ⇒ Error
Returns a new instance of Error.
7 8 9 10 11 12 |
# File 'lib/sportradar/api/baseball/error.rb', line 7 def initialize(data, **opts) @response = data # @game = opts[:game] update(data) end |
Instance Attribute Details
#first_name ⇒ Object
Returns the value of attribute first_name.
5 6 7 |
# File 'lib/sportradar/api/baseball/error.rb', line 5 def first_name @first_name end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/sportradar/api/baseball/error.rb', line 5 def id @id end |
#jersey_number ⇒ Object
Returns the value of attribute jersey_number.
5 6 7 |
# File 'lib/sportradar/api/baseball/error.rb', line 5 def jersey_number @jersey_number end |
#last_name ⇒ Object
Returns the value of attribute last_name.
5 6 7 |
# File 'lib/sportradar/api/baseball/error.rb', line 5 def last_name @last_name end |
#preferred_name ⇒ Object
Returns the value of attribute preferred_name.
5 6 7 |
# File 'lib/sportradar/api/baseball/error.rb', line 5 def preferred_name @preferred_name end |
#response ⇒ Object
Returns the value of attribute response.
5 6 7 |
# File 'lib/sportradar/api/baseball/error.rb', line 5 def response @response end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/sportradar/api/baseball/error.rb', line 5 def type @type end |
Instance Method Details
#update(data, **opts) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/sportradar/api/baseball/error.rb', line 13 def update(data, **opts) @id = data["id"] @type = data["type"] @last_name = data["last_name"] @first_name = data["first_name"] @preferred_name = data["preferred_name"] @jersey_number = data["jersey_number"] end |