Module: DesignShell::Utils
- Defined in:
- lib/designshell/utils.rb
Class Method Summary collapse
Class Method Details
.lookupItems(aDeployNode, aKeyChain) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/designshell/utils.rb', line 3 def self.lookupItems(aDeployNode, aKeyChain) result = {} REXML::XPath.each(aDeployNode,'item') do |n| name = n.attribute('name').to_s.to_nil key = n.attribute('key').to_s.to_nil || name next unless name if text = n.text.to_nil # value in node result[name] = text else # value in @params['deploy_creds'] result[key] = aKeyChain.get(key.to_sym) if key end end result end |