Module: Construqt::Flavour::Delegate

Instance Method Summary collapse

Instance Method Details

#addressObject



43
44
45
# File 'lib/construqt/flavour/delegates.rb', line 43

def address
  self.delegate.address
end

#build_config(host, my) ⇒ Object



76
77
78
79
80
81
82
# File 'lib/construqt/flavour/delegates.rb', line 76

def build_config(host, my)
  #        binding.pry if host && host.name == "ct-iar1-ham"
  #        binding.pry if self.class.name[self.class.name.rindex(':')+1..-1] == "DeviceDelegate"
  #binding.pry
  Flavour.call_aspects("#{simple_name}.build_config", host, my||self)
  self.delegate.build_config(host, my||self)
end

#cableObject



68
69
70
# File 'lib/construqt/flavour/delegates.rb', line 68

def cable
  self.delegate.cable
end

#cable=(a) ⇒ Object



64
65
66
# File 'lib/construqt/flavour/delegates.rb', line 64

def cable=(a)
  self.delegate.cable = a
end

#clazzObject



59
60
61
62
# File 'lib/construqt/flavour/delegates.rb', line 59

def clazz
  #binding.pry
  self.delegate.clazz
end

#default_nameObject



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

def default_name
  self.delegate.default_name
end

#delegateObject



5
6
7
8
# File 'lib/construqt/flavour/delegates.rb', line 5

def delegate
  throw "you need a delegate #{self.class.name}" unless @delegate
  @delegate
end

#delegate=(a) ⇒ Object



10
11
12
13
# File 'lib/construqt/flavour/delegates.rb', line 10

def delegate=(a)
  throw "delegate needs to be !nil" unless a
  @delegate = a
end

#descriptionObject



31
32
33
# File 'lib/construqt/flavour/delegates.rb', line 31

def description
  self.delegate.description
end

#hostObject



51
52
53
# File 'lib/construqt/flavour/delegates.rb', line 51

def host
  self.delegate.host
end

#identObject



84
85
86
# File 'lib/construqt/flavour/delegates.rb', line 84

def ident
  self._ident.gsub(/[^0-9a-zA-Z_]/, '_')
end

#nameObject



39
40
41
# File 'lib/construqt/flavour/delegates.rb', line 39

def name
  self.delegate.name
end

#priorityObject



55
56
57
# File 'lib/construqt/flavour/delegates.rb', line 55

def priority
  self.delegate.priority
end

#simple_nameObject



72
73
74
# File 'lib/construqt/flavour/delegates.rb', line 72

def simple_name
  self.class.name[self.class.name.rindex(':')+1..-1]
end

#tagsObject



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

def tags
  @tags || []
end

#tags=(tags) ⇒ Object



19
20
21
# File 'lib/construqt/flavour/delegates.rb', line 19

def tags=(tags)
  @tags = tags
end

#templateObject



47
48
49
# File 'lib/construqt/flavour/delegates.rb', line 47

def template
  self.delegate.template
end

#vrrpObject



27
28
29
# File 'lib/construqt/flavour/delegates.rb', line 27

def vrrp
  @vrrp
end

#vrrp=(a) ⇒ Object



23
24
25
# File 'lib/construqt/flavour/delegates.rb', line 23

def vrrp=(a)
  @vrrp = a
end