Class: Arena::Comment

Inherits:
Base
  • Object
show all
Includes:
Creatable
Defined in:
lib/arena/comment.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods included from Creatable

#created_at, #updated_at

Methods inherited from Base

attr_reader, #initialize

Constructor Details

This class inherits a constructor from Arena::Base

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



9
10
11
# File 'lib/arena/comment.rb', line 9

def body
  @body
end

#commentable_idObject (readonly)

Returns the value of attribute commentable_id.



9
10
11
# File 'lib/arena/comment.rb', line 9

def commentable_id
  @commentable_id
end

#commentable_typeObject (readonly)

Returns the value of attribute commentable_type.



9
10
11
# File 'lib/arena/comment.rb', line 9

def commentable_type
  @commentable_type
end

#idObject (readonly)

Returns the value of attribute id.



9
10
11
# File 'lib/arena/comment.rb', line 9

def id
  @id
end

Instance Method Details

#_classObject



11
12
13
# File 'lib/arena/comment.rb', line 11

def _class
  @_class ||= @attrs["class"]
end

#userObject



15
16
17
# File 'lib/arena/comment.rb', line 15

def user
  @user ||= Arena::User.new(@attrs["user"])
end