Class: Nelumba::Question
- Inherits:
-
Object
- Object
- Nelumba::Question
- Includes:
- Object
- Defined in:
- lib/nelumba/question.rb
Constant Summary
Constants included from Object
Object::USERNAME_REGULAR_EXPRESSION
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Attributes included from Object
#author, #content, #display_name, #html, #image, #published, #summary, #text, #title, #uid, #updated, #url
Instance Method Summary collapse
- #init(options = {}, &blk) ⇒ Object
-
#initialize(options = {}, &blk) ⇒ Question
constructor
A new instance of Question.
- #to_hash ⇒ Object
- #to_json_hash ⇒ Object
Methods included from Object
#mentions, #reply_to, #to_as1, #to_html, #to_json, #to_text
Constructor Details
#initialize(options = {}, &blk) ⇒ Question
Returns a new instance of Question.
7 8 9 |
# File 'lib/nelumba/question.rb', line 7 def initialize( = {}, &blk) init(, &blk) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/nelumba/question.rb', line 5 def @options end |
Instance Method Details
#init(options = {}, &blk) ⇒ Object
11 12 13 14 15 |
# File 'lib/nelumba/question.rb', line 11 def init( = {}, &blk) super(, &blk) @options = [:options] || [] end |
#to_hash ⇒ Object
17 18 19 20 21 |
# File 'lib/nelumba/question.rb', line 17 def to_hash { :options => @options.dup }.merge(super) end |
#to_json_hash ⇒ Object
23 24 25 26 27 28 |
# File 'lib/nelumba/question.rb', line 23 def to_json_hash { :objectType => "question", :options => @options.dup }.merge(super) end |