Class: Bosh::Template::Test::Link
- Inherits:
-
Object
- Object
- Bosh::Template::Test::Link
- Defined in:
- lib/bosh/template/test/link.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#instances ⇒ Object
readonly
Returns the value of attribute instances.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Instance Method Summary collapse
-
#initialize(name:, instances: [], properties: {}, address: nil) ⇒ Link
constructor
A new instance of Link.
- #to_h ⇒ Object
Constructor Details
#initialize(name:, instances: [], properties: {}, address: nil) ⇒ Link
Returns a new instance of Link.
5 6 7 8 9 10 |
# File 'lib/bosh/template/test/link.rb', line 5 def initialize(name:, instances: [], properties: {}, address: nil) @instances = instances @name = name @properties = properties @address = address end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
3 4 5 |
# File 'lib/bosh/template/test/link.rb', line 3 def address @address end |
#instances ⇒ Object (readonly)
Returns the value of attribute instances.
3 4 5 |
# File 'lib/bosh/template/test/link.rb', line 3 def instances @instances end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/bosh/template/test/link.rb', line 3 def name @name end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
3 4 5 |
# File 'lib/bosh/template/test/link.rb', line 3 def properties @properties end |
Instance Method Details
#to_h ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/bosh/template/test/link.rb', line 12 def to_h { 'instances' => instances.map(&:to_h), 'name' => name, 'properties' => properties, 'address' => address, } end |