Class: Post

Inherits:
Base show all
Defined in:
lib/mattermost/models/post.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#attributes, #first, #last, #to_json

Constructor Details

#initialize(attributes) ⇒ Post

Returns a new instance of Post.



4
5
6
7
# File 'lib/mattermost/models/post.rb', line 4

def initialize(attributes)
  super(attributes)
  @user = Mattermost::User.find(attributes['user_id'])
end

Instance Attribute Details

#userObject

Returns the value of attribute user.



2
3
4
# File 'lib/mattermost/models/post.rb', line 2

def user
  @user
end