Module: ReportsMash::Control::ClassMethods

Included in:
ReportsMash::Control
Defined in:
lib/reportsmash/control/class_methods.rb

Instance Method Summary collapse

Instance Method Details

#instance(create = true) ⇒ Object



4
5
6
# File 'lib/reportsmash/control/class_methods.rb', line 4

def instance(create=true)
  @instance ||= create && new
end

#resetObject

clear out memoized Control and LocalEnv instances



9
10
11
12
# File 'lib/reportsmash/control/class_methods.rb', line 9

def reset
  @instance = nil
  @local_env = nil
end