Class: Schatter::Command::InvitePerson

Inherits:
Object
  • Object
show all
Defined in:
lib/schatter/command/invite_person.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(conversation) ⇒ InvitePerson

Returns a new instance of InvitePerson.



4
5
6
7
8
# File 'lib/schatter/command/invite_person.rb', line 4

def initialize conversation
  @conversation = conversation
  @usage = '<email>'
  @help = 'Invites someone to join a conversation'
end

Instance Attribute Details

#conversationObject (readonly)

Returns the value of attribute conversation.



2
3
4
# File 'lib/schatter/command/invite_person.rb', line 2

def conversation
  @conversation
end

#helpObject (readonly)

Returns the value of attribute help.



2
3
4
# File 'lib/schatter/command/invite_person.rb', line 2

def help
  @help
end

#usageObject (readonly)

Returns the value of attribute usage.



2
3
4
# File 'lib/schatter/command/invite_person.rb', line 2

def usage
  @usage
end

Instance Method Details

#execute(email) ⇒ Object



10
11
12
# File 'lib/schatter/command/invite_person.rb', line 10

def execute email
  conversation.create_person email: email
end