Class: NPR::Entity::Link
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(json) ⇒ Link
constructor
———————.
-
#to_s ⇒ Object
———————.
Methods included from Concern::ShallowAttributes
Methods included from Concern::Relation
Constructor Details
#initialize(json) ⇒ Link
11 12 13 14 |
# File 'lib/npr/entity/link.rb', line 11 def initialize(json) @content = json["$text"] @type = json["type"] end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
7 8 9 |
# File 'lib/npr/entity/link.rb', line 7 def content @content end |
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/npr/entity/link.rb', line 7 def type @type end |
Instance Method Details
#to_s ⇒ Object
18 19 20 |
# File 'lib/npr/entity/link.rb', line 18 def to_s @content.to_s end |