Class: OpenShift::Connection

Inherits:
Model
  • Object
show all
Defined in:
lib/openshift-origin-common/models/connection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Model

attr_accessor, attr_reader, attr_writer, #attributes, #attributes=, #deleted?, exclude_attributes, excludes_attributes, gen_uuid, include_attributes, includes_attributes, #new_record?, #persisted?, primary_key, require_update_attributes, requires_update_attributes, #reset_state, #to_xml

Constructor Details

#initialize(name) ⇒ Connection

Returns a new instance of Connection.



5
6
7
# File 'lib/openshift-origin-common/models/connection.rb', line 5

def initialize(name)
  self.name = name
end

Instance Attribute Details

#componentsObject

Returns the value of attribute components.



3
4
5
# File 'lib/openshift-origin-common/models/connection.rb', line 3

def components
  @components
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/openshift-origin-common/models/connection.rb', line 3

def name
  @name
end

Instance Method Details

#from_descriptor(spec_hash = {}) ⇒ Object



9
10
11
12
# File 'lib/openshift-origin-common/models/connection.rb', line 9

def from_descriptor(spec_hash = {})
  self.components = spec_hash["Components"]
  self
end

#to_descriptorObject



14
15
16
17
18
# File 'lib/openshift-origin-common/models/connection.rb', line 14

def to_descriptor
  {
    "Components" => self.components
  }
end