Class: CloudParty::Responses::Node::Account
- Inherits:
-
Object
- Object
- CloudParty::Responses::Node::Account
- Defined in:
- lib/cloud_party/responses/nodes/zones/account.rb,
lib/cloud_party/responses/nodes/memberships/account.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(account_hsh) ⇒ Account
constructor
A new instance of Account.
- #inspect ⇒ Object
- #settings ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(account_hsh) ⇒ Account
Returns a new instance of Account.
7 8 9 10 11 |
# File 'lib/cloud_party/responses/nodes/zones/account.rb', line 7 def initialize(account_hsh) @account = account_hsh @name = @account[:name] @id = @account[:id] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
14 15 16 |
# File 'lib/cloud_party/responses/nodes/zones/account.rb', line 14 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
13 14 15 |
# File 'lib/cloud_party/responses/nodes/zones/account.rb', line 13 def name @name end |
Instance Method Details
#inspect ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/cloud_party/responses/nodes/zones/account.rb', line 16 def inspect outputs = [] %i[id name].each do |var| outputs << "#{var}=#{send(var)}" end "#<Account #{outputs.join(', ')}>" end |
#settings ⇒ Object
18 19 20 21 22 |
# File 'lib/cloud_party/responses/nodes/memberships/account.rb', line 18 def settings @settings.each do |k, v| settings << { k => v } end end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/cloud_party/responses/nodes/zones/account.rb', line 24 def to_s inspect end |