Class: NPR::Entity::IntroText
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#num ⇒ Object
Returns the value of attribute num.
Instance Method Summary collapse
-
#initialize(json) ⇒ IntroText
constructor
A new instance of IntroText.
-
#to_s ⇒ Object
——————–.
Methods included from Concern::ShallowAttributes
Methods included from Concern::Relation
Constructor Details
#initialize(json) ⇒ IntroText
Returns a new instance of IntroText.
9 10 11 12 |
# File 'lib/npr/entity/intro_text.rb', line 9 def initialize(json) @num = json["num"].to_i @content = json["$text"] end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
7 8 9 |
# File 'lib/npr/entity/intro_text.rb', line 7 def content @content end |
#num ⇒ Object
Returns the value of attribute num.
7 8 9 |
# File 'lib/npr/entity/intro_text.rb', line 7 def num @num end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/npr/entity/intro_text.rb', line 16 def to_s @content.to_s end |