lib/maglev/facets/object.rb
# macro for ||= a instance variable. an optional reset flag can be provided to force a reevaluation of the value
macro for ||= a instance variable. an optional reset flag can be provided to force a reevaluation of the value
macro for || = a instance variable . an optional reset flag can be provided to force a reevaluation of the value
def instance_variable_fetch(name, reset = false)
    v = reset ? nil : instance_variable_get(name)
    if v == nil
      v = yield
      instance_variable_set(name, v) if v
    end
    v
  end
def instance_variable_fetch ( name , reset = false ) v = reset ? nil : instance_variable_get ( name ) if v == nil v = yield instance_variable_set ( name , v ) if v end v end
macro for ||= a instance variable.
macro for || = a instance variable .
name
<not_specific>
reset
<not_specific>