Class: NPR::Entity::BookEdition
- Defined in:
- lib/npr/entity/book_edition.rb
Instance Attribute Summary collapse
-
#format_num ⇒ Object
Returns the value of attribute format_num.
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(json) ⇒ BookEdition
constructor
——————— Note that the “format” property is represented on this object as “format_num”, because of Kernel’s “format”.
Methods included from Concern::ShallowAttributes
Methods included from Concern::Relation
Constructor Details
#initialize(json) ⇒ BookEdition
Note that the “format” property is represented on this object as “format_num”, because of Kernel’s “format”
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/npr/entity/book_edition.rb', line 14 def initialize(json) @id = json["id"].to_i if json["format"] @format_num = json["format"]["$text"].to_i end extract_shallow_attributes(json) create_relations(json) end |
Instance Attribute Details
#format_num ⇒ Object
Returns the value of attribute format_num.
7 8 9 |
# File 'lib/npr/entity/book_edition.rb', line 7 def format_num @format_num end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/npr/entity/book_edition.rb', line 7 def id @id end |