Class: ProcessWanker::ConfigNode

Inherits:
Object
  • Object
show all
Defined in:
lib/config/config_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#containerObject

Returns the value of attribute container.



19
20
21
# File 'lib/config/config_node.rb', line 19

def container
  @container
end

Instance Method Details

#find_attributes(name) ⇒ Object

find_attributes

walk from the current object up to the root, looking for the named attribute



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/config/config_node.rb', line 29

def find_attributes(name)
	r=[]
	p=self
	while(p)
		if(p.respond_to?(name))
			v=p.send(name)
			r << v if(v)
		end
		break if(!p.respond_to?("container"))
		p=p.container
	end
	r
end

#get_authObject

find the innermost auth block



44
45
46
# File 'lib/config/config_node.rb', line 44

def get_auth()
	find_attributes("auth").first
end