Class: ReportPrint::ScopedOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/report_print/scoped_options.rb

Instance Method Summary collapse

Constructor Details

#initialize(global_options) ⇒ ScopedOptions

Returns a new instance of ScopedOptions.



3
4
5
6
7
8
9
# File 'lib/report_print/scoped_options.rb', line 3

def initialize(global_options)
  @global_options = global_options
  @cache = {
    Object => Object.report_print_options,
    BasicObject => {}
  }
end

Instance Method Details

#options_for(klass) ⇒ Object



11
12
13
# File 'lib/report_print/scoped_options.rb', line 11

def options_for(klass)
  @global_options.merge(self_options_for(klass).compact)
end