Class: Pairzone::Commands::Info
- Inherits:
-
Object
- Object
- Pairzone::Commands::Info
- Defined in:
- lib/pairzone/commands/info.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(project_name) ⇒ Info
constructor
A new instance of Info.
Constructor Details
#initialize(project_name) ⇒ Info
Returns a new instance of Info.
4 5 6 |
# File 'lib/pairzone/commands/info.rb', line 4 def initialize(project_name) @project_name = project_name end |
Instance Method Details
#execute ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/pairzone/commands/info.rb', line 8 def execute Logger.info("<%= color('Pairzone Account Information', CYAN + BOLD) %>") @user = Pairzone::Api::User.current_user Logger.info(@user) Logger.info("") Logger.debug("Finding information about local pairzone: #{local_pairzone_name}") pairzone = Pairzone::Api::Pairzone.find_by_project_name(local_pairzone_name) Logger.info(pairzone || "No pairzone found for this directory (create one with <%= color('pairzone create', CYAN) %>).") end |