class RHC::Wizard

Constants

STAGES

Public Class Methods

new(config) click to toggle source
# File lib/rhc/wizard.rb, line 27
def initialize(config)
  @config = config
  @config_path = config.config_path
  if @libra_server.nil?
    @libra_server = config['libra_server']
    # if not set, set to default
    @libra_server = @libra_server ?  @libra_server : "openshift.redhat.com"
  end
end

Public Instance Methods

run() click to toggle source

Public: Runs the setup wizard to make sure ~/.openshift and ~/.ssh are correct

Examples

wizard.run()
# => true

Returns nil on failure or true on success

# File lib/rhc/wizard.rb, line 45
def run
  stages.each do |stage|
    # FIXME: cleanup if we fail
    if (self.send stage).nil?
      return nil
    end
  end
  true
end
stages() click to toggle source
# File lib/rhc/wizard.rb, line 23
def stages
  STAGES
end