Class: Lighthouse::CLI::Output
- Inherits:
-
Object
- Object
- Lighthouse::CLI::Output
- Defined in:
- lib/lighthouse/cli/output.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ Output
constructor
A new instance of Output.
- #project(options) ⇒ Object
- #ticket(options) ⇒ Object
Constructor Details
#initialize(options) ⇒ Output
5 6 7 8 9 10 11 |
# File 'lib/lighthouse/cli/output.rb', line 5 def initialize() if [:ticket] self.send(:ticket, ) elsif [:project] self.send(:project, ) end end |
Instance Method Details
#project(options) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/lighthouse/cli/output.rb', line 30 def project() projects = Lighthouse::Project.find(:all) if [:list] Lighthouse::CLI::Project.list(projects) end end |
#ticket(options) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/lighthouse/cli/output.rb', line 13 def ticket() ticket = Lighthouse::Ticket.find([:ticket], :params => { :project_id => 96940 }) if [:state] if Lighthouse::CLI::Ticket.update(ticket, ) puts "** Ticket Updated **" Lighthouse::CLI::Ticket.show(ticket) end else Lighthouse::CLI::Ticket.show(ticket) end if [:open] `open #{ticket.url}` end end |