Method: RFacter::Util::Resolution#evaluate
- Defined in:
- lib/rfacter/util/resolution.rb
#evaluate(&block) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Evaluate the given block in the context of this resolution. If a block has already been evaluated emit a warning to that effect.
72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/rfacter/util/resolution.rb', line 72 def evaluate(&block) if @last_evaluated msg = "Already evaluated #{@name}" msg << " at #{@last_evaluated}" if msg.is_a? String msg << ", reevaluating anyways" logger.warn msg end instance_eval(&block) @last_evaluated = block.source_location.join(':') end |