Class: Arena::Comment
- Includes:
- Creatable
- Defined in:
- lib/arena/comment.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#commentable_id ⇒ Object
readonly
Returns the value of attribute commentable_id.
-
#commentable_type ⇒ Object
readonly
Returns the value of attribute commentable_type.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Attributes inherited from Base
Instance Method Summary collapse
Methods included from Creatable
Methods inherited from Base
Constructor Details
This class inherits a constructor from Arena::Base
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
11 12 13 |
# File 'lib/arena/comment.rb', line 11 def body @body end |
#commentable_id ⇒ Object (readonly)
Returns the value of attribute commentable_id.
11 12 13 |
# File 'lib/arena/comment.rb', line 11 def commentable_id @commentable_id end |
#commentable_type ⇒ Object (readonly)
Returns the value of attribute commentable_type.
11 12 13 |
# File 'lib/arena/comment.rb', line 11 def commentable_type @commentable_type end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
11 12 13 |
# File 'lib/arena/comment.rb', line 11 def id @id end |
Instance Method Details
#_class ⇒ Object
13 14 15 |
# File 'lib/arena/comment.rb', line 13 def _class @_class ||= @attrs['class'] end |
#user ⇒ Object
17 18 19 |
# File 'lib/arena/comment.rb', line 17 def user @user ||= Arena::User.new(@attrs['user']) end |