Module: Memorandum::InstanceMethods
- Defined in:
- lib/memorandum.rb
Instance Method Summary collapse
Instance Method Details
#memorandum_fetch(name, default) ⇒ Object
84 85 86 |
# File 'lib/memorandum.rb', line 84 def memorandum_fetch name, default instance_variable_get(name) || instance_variable_set(name, default) end |
#memorandum_reset(name) ⇒ Object
88 89 90 91 92 93 94 95 96 |
# File 'lib/memorandum.rb', line 88 def memorandum_reset name memoized_statuses = self .class .memorandum_ivar_name(MEMORANDUM_STATUSES, name) statuses = memorandum_fetch memoized_statuses, Hash[] statuses.clear end |