Class: Thanos::Item::Comic
- Inherits:
-
Object
- Object
- Thanos::Item::Comic
- Defined in:
- lib/thanos/resources/item/comic.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#resource_uri ⇒ Object
readonly
Returns the value of attribute resource_uri.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #complete ⇒ Object
-
#initialize(data) ⇒ Comic
constructor
A new instance of Comic.
Constructor Details
#initialize(data) ⇒ Comic
Returns a new instance of Comic.
6 7 8 9 10 11 |
# File 'lib/thanos/resources/item/comic.rb', line 6 def initialize(data) @id = data['id'].to_i @name = data['name'] @resource_uri = data['resourceURI'] @type = data['type'] || nil end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/thanos/resources/item/comic.rb', line 4 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/thanos/resources/item/comic.rb', line 4 def name @name end |
#resource_uri ⇒ Object (readonly)
Returns the value of attribute resource_uri.
4 5 6 |
# File 'lib/thanos/resources/item/comic.rb', line 4 def resource_uri @resource_uri end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/thanos/resources/item/comic.rb', line 4 def type @type end |