Class: Post
Instance Attribute Summary collapse
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Post
constructor
A new instance of Post.
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
#user ⇒ Object
Returns the value of attribute user.
2 3 4 |
# File 'lib/mattermost/models/post.rb', line 2 def user @user end |