Class: Fog::OpenStack::Auth::Name
- Inherits:
 - 
      Struct
      
        
- Object
 - Struct
 - Fog::OpenStack::Auth::Name
 
 
- Defined in:
 - lib/fog/openstack/auth/name.rb,
lib/fog/openstack/auth/name.rb 
Direct Known Subclasses
Instance Attribute Summary collapse
- 
  
    
      #id  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute id.
 - 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute name.
 
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id
      24 25 26  | 
    
      # File 'lib/fog/openstack/auth/name.rb', line 24 def id @id end  | 
  
#name ⇒ Object
Returns the value of attribute name
      24 25 26  | 
    
      # File 'lib/fog/openstack/auth/name.rb', line 24 def name @name end  | 
  
Instance Method Details
#identity ⇒ Object
      26 27 28 29 30  | 
    
      # File 'lib/fog/openstack/auth/name.rb', line 26 def identity return to_h(:id) unless id.nil? return to_h(:name) unless name.nil? raise Fog::OpenStack::Auth::CredentialsError, "#{self.class}: No available id or name" end  | 
  
#to_h(var) ⇒ Object
      32 33 34  | 
    
      # File 'lib/fog/openstack/auth/name.rb', line 32 def to_h(var) {var => send(var).to_s} end  |