Class: NPR::Entity::Author

Inherits:
Base
  • Object
show all
Defined in:
lib/npr/entity/author.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Concern::ShallowAttributes

included

Methods included from Concern::Relation

included

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

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/npr/entity/author.rb', line 7

def id
  @id
end

#numObject

Returns the value of attribute num.



7
8
9
# File 'lib/npr/entity/author.rb', line 7

def num
  @num
end