Class: Bosh::Director::DeploymentPlan::TemplateLink
- Defined in:
- lib/bosh/director/deployment_plan/links/template_link.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
3 4 5 |
# File 'lib/bosh/director/deployment_plan/links/template_link.rb', line 3 def name @name end |
#type ⇒ Object
Returns the value of attribute type
3 4 5 |
# File 'lib/bosh/director/deployment_plan/links/template_link.rb', line 3 def type @type end |
Class Method Details
.parse(link_def) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/bosh/director/deployment_plan/links/template_link.rb', line 4 def self.parse(link_def) if link_def.is_a?(String) return new(link_def, link_def) end if link_def.is_a?(Hash) && link_def.has_key?('name') && link_def.has_key?('type') return new(link_def['name'], link_def['type']) end raise JobInvalidLinkSpec, "Link '#{link_def}' must be either string or hash with name and type" end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/bosh/director/deployment_plan/links/template_link.rb', line 16 def to_s "name: #{name}, type: #{type}" end |