Class: NPR::Entity::Book
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(json) ⇒ Book
constructor
———————.
Methods included from Concern::ShallowAttributes
Methods included from Concern::Relation
Constructor Details
#initialize(json) ⇒ Book
13 14 15 16 17 18 |
# File 'lib/npr/entity/book.rb', line 13 def initialize(json) @id = json["id"].to_i extract_shallow_attributes(json) create_relations(json) end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/npr/entity/book.rb', line 7 def id @id end |