Class: Construqt::Templates::Template
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Construqt::Templates::Template
- Defined in:
- lib/construqt/templates.rb
Instance Method Summary collapse
-
#initialize(cfg) ⇒ Template
constructor
A new instance of Template.
- #is_tagged?(vlan_id) ⇒ Boolean
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
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 |