Class: Atig::Command::Name
Instance Attribute Summary
Attributes inherited from Command
#api, #db, #gateway, #opts
Instance Method Summary
collapse
Methods inherited from Command
#find_by_tid, #initialize
Instance Method Details
#action(target, mesg, command, args) ⇒ Object
9
10
11
12
13
14
15
|
# File 'lib/atig/command/name.rb', line 9
def action(target, mesg, command, args)
api.delay(0) do|t|
name = mesg.split(" ", 2)[1] || ""
t.post('account/update_profile',:name=>name)
yield "You are named #{name}."
end
end
|
#command_name ⇒ Object
7
|
# File 'lib/atig/command/name.rb', line 7
def command_name; %w(name) end
|