Class: TwicasStream::TwicasApiObject::Comment
- Inherits:
-
Object
- Object
- TwicasStream::TwicasApiObject::Comment
- Defined in:
- lib/twicas_stream/twicas_api_object/comment.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
-
#initialize(elements = {}) ⇒ Comment
constructor
A new instance of Comment.
Constructor Details
#initialize(elements = {}) ⇒ Comment
Returns a new instance of Comment.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/twicas_stream/twicas_api_object/comment.rb', line 11 def initialize elements = {} from_user = User.new(elements['from_user']) @object = { :id => elements['id'], :message => elements['message'], :from_user => from_user.object, :created => elements['created'] } end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
9 10 11 |
# File 'lib/twicas_stream/twicas_api_object/comment.rb', line 9 def object @object end |