Class: Mattermost::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/mattermost/client.rb

Direct Known Subclasses

Command, Team

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user) ⇒ Client

Returns a new instance of Client.



9
10
11
# File 'lib/mattermost/client.rb', line 9

def initialize(user)
  @user = user
end

Instance Attribute Details

#userObject (readonly)

Returns the value of attribute user.



7
8
9
# File 'lib/mattermost/client.rb', line 7

def user
  @user
end

Instance Method Details

#with_session(&blk) ⇒ Object



13
14
15
# File 'lib/mattermost/client.rb', line 13

def with_session(&blk)
  ::Mattermost::Session.new(user).with_session(&blk)
end