Class: Cloudn::Shell

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudn_cli/shell.rb,
lib/cloudn_cli/version.rb

Defined Under Namespace

Classes: SyntaxError

Constant Summary collapse

VERSION =
"0.9.0"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config_path) ⇒ Shell

Returns a new instance of Shell.



29
30
31
32
33
34
35
36
# File 'lib/cloudn_cli/shell.rb', line 29

def initialize(config_path)
  @config_path = config_path.freeze
  @xml_formatter = REXML::Formatters::Pretty.new(2)
  @xml_formatter.compact = true
  load_config
  create_client
  input_loop
end

Instance Attribute Details

#config_pathObject (readonly)

Returns the value of attribute config_path.



38
39
40
# File 'lib/cloudn_cli/shell.rb', line 38

def config_path
  @config_path
end

#current_userObject Also known as: user

Returns the value of attribute current_user.



38
39
40
# File 'lib/cloudn_cli/shell.rb', line 38

def current_user
  @current_user
end

#jsonObject

Returns the value of attribute json.



38
39
40
# File 'lib/cloudn_cli/shell.rb', line 38

def json
  @json
end

#rawObject

Returns the value of attribute raw.



38
39
40
# File 'lib/cloudn_cli/shell.rb', line 38

def raw
  @raw
end

#urlObject (readonly)

Returns the value of attribute url.



38
39
40
# File 'lib/cloudn_cli/shell.rb', line 38

def url
  @url
end

#usersObject (readonly)

Returns the value of attribute users.



38
39
40
# File 'lib/cloudn_cli/shell.rb', line 38

def users
  @users
end