Class: Logan::Comment

Inherits:
Object
  • Object
show all
Includes:
HashConstructed
Defined in:
lib/logan/comment.rb

Instance Attribute Summary collapse

Attributes included from HashConstructed

#attributes, #json_raw

Instance Method Summary collapse

Methods included from HashConstructed

#initialize

Instance Attribute Details

#contentObject

Returns the value of attribute content.



8
9
10
# File 'lib/logan/comment.rb', line 8

def content
  @content
end

#created_atObject

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#creatorObject

Returns the value of attribute creator.



14
15
16
# File 'lib/logan/comment.rb', line 14

def creator
  @creator
end

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/logan/comment.rb', line 7

def id
  @id
end

#privateObject

Returns the value of attribute private.



12
13
14
# File 'lib/logan/comment.rb', line 12

def private
  @private
end

#subscribersObject

Returns the value of attribute subscribers.



13
14
15
# File 'lib/logan/comment.rb', line 13

def subscribers
  @subscribers
end

#trashedObject

Returns the value of attribute trashed.



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

def trashed
  @trashed
end

#updated_atObject

Returns the value of attribute updated_at.



10
11
12
# File 'lib/logan/comment.rb', line 10

def updated_at
  @updated_at
end

Instance Method Details

#post_jsonObject



16
17
18
19
20
21
22
23
# File 'lib/logan/comment.rb', line 16

def post_json
  {
    :content => @content,
    :trashed => @trashed,
    :private => @private,
    :creator => @creator.nil? ? nil : @creator.to_hash
  }.to_json
end