Class: OpenShift::Connection
- Defined in:
- lib/openshift-origin-common/models/connection.rb
Instance Attribute Summary collapse
-
#components ⇒ Object
Returns the value of attribute components.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #from_descriptor(spec_hash = {}) ⇒ Object
-
#initialize(name) ⇒ Connection
constructor
A new instance of Connection.
- #to_descriptor ⇒ Object
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
#components ⇒ Object
Returns the value of attribute components.
3 4 5 |
# File 'lib/openshift-origin-common/models/connection.rb', line 3 def components @components end |
#name ⇒ Object
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_descriptor ⇒ Object
14 15 16 17 18 |
# File 'lib/openshift-origin-common/models/connection.rb', line 14 def to_descriptor { "Components" => self.components } end |