Class: Atig::Command::Location
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
16
17
18
19
20
|
# File 'lib/atig/command/location.rb', line 9
def action(target, mesg, command, args)
api.delay(0) do|t|
location = mesg.split(" ", 2)[1] || ""
t.post('account/update_profile',:location=>location)
if location.empty? then
yield "You are nowhere now."
else
yield "You are in #{location} now."
end
end
end
|
#command_name ⇒ Object
7
|
# File 'lib/atig/command/location.rb', line 7
def command_name; %w(in location loc) end
|