lib/cim_profile_types.rb
#
# Given its name, look up the profile in the hash.
# Like [], but it dups the profile and passes it to the block, if given.
#
Given its name, look up the profile in the hash.
Like [], but it dups the profile and passes it to the block, if given.
Given its name look up the profile in the hash . Like [] but it dups the profile and passes it to the block if given .
def lookup(sym, &block)
    raise "#{self.class.name}.lookup: profile #{sym} not found." if (node = self[sym]).nil?
    node = node.deep_dup
    block.arity < 1 ? node.instance_eval(&block) : block.call(node) unless block.nil?
    node
  end
def lookup ( sym , & block ) raise "#{self.class.name}.lookup: profile #{sym} not found." if ( node = self [ sym ] ) . nil? node = node . deep_dup block . arity < 1 ? node . instance_eval ( & block ) : block . call ( node ) unless block . nil? node end
Given its name, look up the profile in the hash.
Given its name look up the profile in the hash .
sym
<not_specific>
block
<not_specific>