Class: NPR::Entity::Paragraph
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) ⇒ Paragraph
constructor
———————.
-
#to_s ⇒ Object
———————.
Methods included from Concern::ShallowAttributes
Methods included from Concern::Relation
Constructor Details
#initialize(json) ⇒ Paragraph
15 16 17 18 |
# File 'lib/npr/entity/paragraph.rb', line 15 def initialize(json) @content = json["$text"] @num = json["num"].to_i end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
11 12 13 |
# File 'lib/npr/entity/paragraph.rb', line 11 def content @content end |
#num ⇒ Object
Returns the value of attribute num.
11 12 13 |
# File 'lib/npr/entity/paragraph.rb', line 11 def num @num end |
Instance Method Details
#to_s ⇒ Object
22 23 24 |
# File 'lib/npr/entity/paragraph.rb', line 22 def to_s @content.to_s end |