Class: Atig::Command::Name

Inherits:
Command
  • Object
show all
Defined in:
lib/atig/command/name.rb

Instance Attribute Summary

Attributes inherited from Command

#api, #db, #gateway, #opts

Instance Method Summary collapse

Methods inherited from Command

#find_by_tid, #initialize

Constructor Details

This class inherits a constructor from Atig::Command::Command

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_nameObject



7
# File 'lib/atig/command/name.rb', line 7

def command_name; %w(name) end