Class: Bosh::Template::Test::Link

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/template/test/link.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, instances: [], properties: {}) ⇒ Link

Returns a new instance of Link.



5
6
7
8
9
# File 'lib/bosh/template/test/link.rb', line 5

def initialize(name:, instances: [], properties: {})
  @instances = instances
  @name = name
  @properties = properties
end

Instance Attribute Details

#instancesObject (readonly)

Returns the value of attribute instances.



3
4
5
# File 'lib/bosh/template/test/link.rb', line 3

def instances
  @instances
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/bosh/template/test/link.rb', line 3

def name
  @name
end

#propertiesObject (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_hObject



11
12
13
14
15
16
17
# File 'lib/bosh/template/test/link.rb', line 11

def to_h
  {
    'instances' => instances.map(&:to_h),
    'name' => name,
    'properties' => properties,
  }
end