Class: Kstats::Node::Probe::Variable

Inherits:
Object
  • Object
show all
Defined in:
lib/kstats/node/probe.rb

Defined Under Namespace

Classes: DSL

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, parent) ⇒ Variable



75
76
77
78
# File 'lib/kstats/node/probe.rb', line 75

def initialize name, parent
  @name = name
  @parent = parent
end

Instance Attribute Details

#colorObject

Returns the value of attribute color.



73
74
75
# File 'lib/kstats/node/probe.rb', line 73

def color
  @color
end

#descObject

Returns the value of attribute desc.



73
74
75
# File 'lib/kstats/node/probe.rb', line 73

def desc
  @desc
end

#nameObject (readonly)

Returns the value of attribute name.



72
73
74
# File 'lib/kstats/node/probe.rb', line 72

def name
  @name
end

#probeObject

Returns the value of attribute probe.



73
74
75
# File 'lib/kstats/node/probe.rb', line 73

def probe
  @probe
end

Instance Method Details

#commandObject



80
81
82
# File 'lib/kstats/node/probe.rb', line 80

def command
  @parent.command
end

#from_dsl(&block) ⇒ Object



88
89
90
91
92
93
# File 'lib/kstats/node/probe.rb', line 88

def from_dsl &block
  dsl = DSL.new(self)
  dsl.instance_eval(&block)

  return self
end

#testObject



84
85
86
# File 'lib/kstats/node/probe.rb', line 84

def test
  instance_eval(&probe)
end