Module: Noventius::Report::Dsl::Nested::InstanceMethods
- Included in:
- InstanceMethods
- Defined in:
- lib/noventius/report/dsl/nested.rb
Instance Method Summary collapse
Instance Method Details
#build_nested_report(row) ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/noventius/report/dsl/nested.rb', line 48 def build_nested_report(row) row ||= [] nested_filters = [:filters] || filter_params nested_filters = public_send(nested_filters, row) if nested_filters.is_a?(Symbol) nested_filters = instance_exec(row, &nested_filters) if nested_filters.is_a?(Proc) self.class.nested_report_class.new(nested_filters) end |
#enable_nested? ⇒ Boolean
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/noventius/report/dsl/nested.rb', line 36 def enable_nested? return @enable_nested unless @enable_nested.nil? return false unless self.class.includes_nested? @enable_nested = .fetch(:if, true) @enable_nested = public_send(@enable_nested) if @enable_nested.is_a?(Symbol) @enable_nested = instance_exec(&@enable_nested) if @enable_nested.is_a?(Proc) @enable_nested end |
#nested_options ⇒ Object
32 33 34 |
# File 'lib/noventius/report/dsl/nested.rb', line 32 def self.class. end |