Class: Construqt::Templates::Template

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/construqt/templates.rb

Instance Method Summary collapse

Constructor Details

#initialize(cfg) ⇒ Template

Returns a new instance of Template.



10
11
12
# File 'lib/construqt/templates.rb', line 10

def initialize(cfg)
  super(cfg)
end

Instance Method Details

#is_tagged?(vlan_id) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
17
18
19
20
# File 'lib/construqt/templates.rb', line 14

def is_tagged?(vlan_id)
  self.vlans.each do |vlan|
    return vlan.tagged? if vlan.vlan_id == vlan_id
  end

  throw "vlan with id #{vlan_id} not found in template #{self}"
end