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