Class: Morale::Command

Inherits:
Thor
  • Object
show all
Defined in:
lib/morale/command.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.clientObject



53
54
55
# File 'lib/morale/command.rb', line 53

def client
  Morale::Authorization.client
end

Instance Method Details

#account(id) ⇒ Object



23
24
25
# File 'lib/morale/command.rb', line 23

def (id)
  Morale::Commands::Account.select id
end

#accounts(email = "") ⇒ Object



18
19
20
# File 'lib/morale/command.rb', line 18

def accounts(email="")
  Morale::Commands::Account.list email, options.change
end

#loginObject



12
13
14
# File 'lib/morale/command.rb', line 12

def 
  Morale::Commands::Authorization.
end

#project(id) ⇒ Object



34
35
36
# File 'lib/morale/command.rb', line 34

def project(id)
  Morale::Commands::Project.select id
end

#projectsObject



29
30
31
# File 'lib/morale/command.rb', line 29

def projects
  Morale::Commands::Project.list options.change
end

#ticket(command = "") ⇒ Object



40
41
42
43
44
45
# File 'lib/morale/command.rb', line 40

def ticket(command="")
  if command.empty? && !options[:command].nil?
    command = options[:command].compact.join(" ")
  end
  Morale::Commands::Ticket.command command
end

#ticketsObject



48
49
50
# File 'lib/morale/command.rb', line 48

def tickets
  Morale::Commands::Ticket.list
end