class Bosh::Template::EvaluationLinkInstance
Attributes
address[R]
az[R]
id[R]
index[R]
name[R]
properties[R]
Public Class Methods
new(name, index, id, az, address, properties)
click to toggle source
# File lib/bosh/template/evaluation_link_instance.rb, line 15 def initialize(name, index, id, az, address, properties) @name = name @index = index @id = id @az = az @address = address @properties = properties end
Public Instance Methods
if_p(*names) { |*values| ... }
click to toggle source
# File lib/bosh/template/evaluation_link_instance.rb, line 36 def if_p(*names) values = names.map do |name| value = lookup_property(@properties, name) return ActiveElseBlock.new(self) if value.nil? value end yield *values InactiveElseBlock.new end
p(*args)
click to toggle source
# File lib/bosh/template/evaluation_link_instance.rb, line 24 def p(*args) names = Array(args[0]) names.each do |name| result = lookup_property(@properties, name) return result unless result.nil? end return args[1] if args.length == 2 raise UnknownProperty.new(names) end