Class: Ufo::CLI::Central::Base

Inherits:
Object
  • Object
show all
Includes:
Utils::Logging, Utils::Pretty, Utils::Sure
Defined in:
lib/ufo/cli/central/base.rb

Direct Known Subclasses

Clean, Update

Instance Method Summary collapse

Methods included from Utils::Sure

#sure?

Methods included from Utils::Pretty

#pretty_home, #pretty_path, #pretty_time

Methods included from Utils::Logging

#logger

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



7
8
9
# File 'lib/ufo/cli/central/base.rb', line 7

def initialize(options={})
  @options = options
end

Instance Method Details

#execute(command) ⇒ Object

Central has own version of execute because it doesnt have access to logger



19
20
21
22
# File 'lib/ufo/cli/central/base.rb', line 19

def execute(command)
  log "=> #{command}"
  system command
end

#log(msg) ⇒ Object

Do not use logger.info for ufo central commands as .ufo may not be yet setup We do not want any config calls to trigger a loading of the .ufo/config.rb etc Otherwise helper methods like ecr_repo may be called and not work yet



14
15
16
# File 'lib/ufo/cli/central/base.rb', line 14

def log(msg)
  puts msg
end