Class: Deltacloud::Realm

Inherits:
BaseModel show all
Defined in:
lib/deltacloud/models/realm.rb

Instance Attribute Summary collapse

Attributes inherited from BaseModel

#description

Instance Method Summary collapse

Methods inherited from BaseModel

attr_accessor, attributes, #attributes, #id, #initialize, #to_entity

Constructor Details

This class inherits a constructor from Deltacloud::BaseModel

Instance Attribute Details

#limitObject

Returns the value of attribute limit.



21
22
23
# File 'lib/deltacloud/models/realm.rb', line 21

def limit
  @limit
end

#nameObject

Returns the value of attribute name.



20
21
22
# File 'lib/deltacloud/models/realm.rb', line 20

def name
  @name
end

#stateObject

Returns the value of attribute state.



22
23
24
# File 'lib/deltacloud/models/realm.rb', line 22

def state
  @state
end

Instance Method Details

#to_hash(context) ⇒ Object



24
25
26
27
28
29
30
31
32
33
# File 'lib/deltacloud/models/realm.rb', line 24

def to_hash(context)
  r = {
    :id => self.id,
    :href => context.realm_url(self.id),
    :name => name,
    :state => state,
    :limit => limit
  }
  r
end