Class: LibraryItem
Instance Attribute Summary collapse
-
#media_id ⇒ Object
readonly
Returns the value of attribute media_id.
-
#rating ⇒ Object
readonly
Returns the value of attribute rating.
-
#record_id ⇒ Object
readonly
Returns the value of attribute record_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(user_id, entry_result, media_result) ⇒ LibraryItem
constructor
A new instance of LibraryItem.
Methods inherited from Helpers
Constructor Details
#initialize(user_id, entry_result, media_result) ⇒ LibraryItem
Returns a new instance of LibraryItem.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/foxit/objects.rb', line 8 def initialize user_id, entry_result, media_result @user_id = user_id.to_i @record_id = entry_result['id'].to_i @status = entry_result['attributes']['status'] = entry_result['attributes']['ratingTwenty'] = .nil? ? nil : .to_i @media_id = media_result['data']['id'].to_i @type = media_result['data']['type'] end |
Instance Attribute Details
#media_id ⇒ Object (readonly)
Returns the value of attribute media_id.
6 7 8 |
# File 'lib/foxit/objects.rb', line 6 def media_id @media_id end |
#rating ⇒ Object (readonly)
Returns the value of attribute rating.
6 7 8 |
# File 'lib/foxit/objects.rb', line 6 def end |
#record_id ⇒ Object (readonly)
Returns the value of attribute record_id.
6 7 8 |
# File 'lib/foxit/objects.rb', line 6 def record_id @record_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/foxit/objects.rb', line 6 def status @status end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/foxit/objects.rb', line 6 def type @type end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
6 7 8 |
# File 'lib/foxit/objects.rb', line 6 def user_id @user_id end |