Class: Cloudn::User
- Inherits:
-
Object
- Object
- Cloudn::User
- Defined in:
- lib/cloudn_cli/shell.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#api_location ⇒ Object
readonly
Returns the value of attribute api_location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#secret_key ⇒ Object
readonly
Returns the value of attribute secret_key.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(name, opt) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(name, opt) ⇒ User
Returns a new instance of User.
13 14 15 16 17 18 19 20 21 |
# File 'lib/cloudn_cli/shell.rb', line 13 def initialize(name, opt) @name = name.freeze @api_key = opt[:api_key].freeze @secret_key = opt[:secret_key].freeze url = opt[:url] @url = url.is_a?(URI::HTTP) ? url : URI.parse(url) @url.freeze @api_location = opt[:api_location].freeze end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
23 24 25 |
# File 'lib/cloudn_cli/shell.rb', line 23 def api_key @api_key end |
#api_location ⇒ Object (readonly)
Returns the value of attribute api_location.
23 24 25 |
# File 'lib/cloudn_cli/shell.rb', line 23 def api_location @api_location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
23 24 25 |
# File 'lib/cloudn_cli/shell.rb', line 23 def name @name end |
#secret_key ⇒ Object (readonly)
Returns the value of attribute secret_key.
23 24 25 |
# File 'lib/cloudn_cli/shell.rb', line 23 def secret_key @secret_key end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
23 24 25 |
# File 'lib/cloudn_cli/shell.rb', line 23 def url @url end |