Class: Hacker::News::PollOpt
Overview
A single option under a Poll. poll is the parent Poll id.
Instance Attribute Summary collapse
-
#poll ⇒ Object
readonly
Returns the value of attribute poll.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes inherited from Item
Instance Method Summary collapse
Methods inherited from Item
Constructor Details
This class inherits a constructor from Hacker::News::Item
Instance Attribute Details
#poll ⇒ Object (readonly)
Returns the value of attribute poll.
113 114 115 |
# File 'lib/hacker/news/items.rb', line 113 def poll @poll end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
113 114 115 |
# File 'lib/hacker/news/items.rb', line 113 def score @score end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
113 114 115 |
# File 'lib/hacker/news/items.rb', line 113 def text @text end |
Instance Method Details
#assign(h) ⇒ Object
115 116 117 118 119 |
# File 'lib/hacker/news/items.rb', line 115 def assign(h) @poll = h['poll'] @score = h['score'] @text = h['text'] end |