Class: NPR::Entity::Name
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#personId ⇒ Object
Returns the value of attribute personId.
Instance Method Summary collapse
-
#initialize(json) ⇒ Name
constructor
——————-.
-
#to_s ⇒ Object
——————-.
Methods included from Concern::ShallowAttributes
Methods included from Concern::Relation
Constructor Details
#initialize(json) ⇒ Name
13 14 15 16 |
# File 'lib/npr/entity/name.rb', line 13 def initialize(json) @personId = json["personId"].to_i @content = json["$text"] end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
9 10 11 |
# File 'lib/npr/entity/name.rb', line 9 def content @content end |
#personId ⇒ Object
Returns the value of attribute personId.
9 10 11 |
# File 'lib/npr/entity/name.rb', line 9 def personId @personId end |
Instance Method Details
#to_s ⇒ Object
20 21 22 |
# File 'lib/npr/entity/name.rb', line 20 def to_s @content.to_s end |