Class: Construqt::Vlans::Vlan

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

Instance Method Summary collapse

Constructor Details

#initialize(cfg) ⇒ Vlan

Returns a new instance of Vlan.



11
12
13
# File 'lib/construqt/vlans.rb', line 11

def initialize(cfg)
  super(cfg)
end

Instance Method Details

#nountaggedObject



39
40
41
42
# File 'lib/construqt/vlans.rb', line 39

def nountagged
  @nountagged=true
  self
end

#nountagged?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/construqt/vlans.rb', line 35

def nountagged?
  @nountagged
end

#taggedObject



19
20
21
22
23
# File 'lib/construqt/vlans.rb', line 19

def tagged
  @tagged=true
  @nountagged=false
  self
end

#tagged?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/construqt/vlans.rb', line 15

def tagged?
  !@nountagged && @tagged
end

#untaggedObject



29
30
31
32
33
# File 'lib/construqt/vlans.rb', line 29

def untagged
  @tagged = false
  @nountagged=false
  self
end

#untagged?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/construqt/vlans.rb', line 25

def untagged?
  !@nountagged && !@tagged
end