Class: HostedChef::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/hosted-chef/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#orgnameObject



20
21
22
# File 'lib/hosted-chef/cli.rb', line 20

def orgname
  @orgname ||= HighLine.new.ask("Your Hosted Chef organization? ")
end

#passwordObject



8
9
10
# File 'lib/hosted-chef/cli.rb', line 8

def password
  @password ||= HighLine.new.ask("Your Hosted Chef password: ") {|q| q.echo = "*"}
end

#usernameObject



14
15
16
# File 'lib/hosted-chef/cli.rb', line 14

def username
  @username ||= HighLine.new.ask("Your Hosted Chef username? ")
end

Instance Method Details

#ask_for_missing_optsObject

force evaluation of options



25
26
27
28
29
# File 'lib/hosted-chef/cli.rb', line 25

def ask_for_missing_opts
  username
  password
  orgname
end