class Akashiyaki::Command
Attributes
account[R]
action[R]
mode[R]
Public Class Methods
new(mode, action, account)
click to toggle source
# File lib/akashiyaki/command.rb, line 10 def initialize(mode, action, account) @mode = mode @action = action @account = account end
Public Instance Methods
run()
click to toggle source
# File lib/akashiyaki/command.rb, line 16 def run client.send(:"#{action}_#{mode}") puts "Succeeded!" rescue NotAuthorized => e puts "Failed! #{e.message}" end
Private Instance Methods
client()
click to toggle source
# File lib/akashiyaki/command.rb, line 25 def client @client ||= Client.new( account.company, account.id, account.password ) end