Class: EYCli::Command::Apps

Inherits:
Base
  • Object
show all
Defined in:
lib/ey_cli/commands/apps.rb

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#options_parser, #run

Constructor Details

#initializeApps

Returns a new instance of Apps.



4
5
6
# File 'lib/ey_cli/commands/apps.rb', line 4

def initialize
  @apps = EYCli::Controller::Apps.new
end

Instance Method Details

#helpObject



16
17
18
19
20
21
# File 'lib/ey_cli/commands/apps.rb', line 16

def help
  <<-EOF
List the applications created under your account and the accounts you are collaborating with.
Usage: ey_cli apps
EOF
end

#invokeObject



8
9
10
11
12
13
14
# File 'lib/ey_cli/commands/apps.rb', line 8

def invoke
  apps = @apps.fetch_apps.map {|a| "  - #{a.name}"}.join("\n")
  EYCli.term.say <<-EOF
Available applications:
#{apps}
EOF
end