Class: Dossier::MultiReport
- Inherits:
-
Object
- Object
- Dossier::MultiReport
show all
- Includes:
- Model
- Defined in:
- lib/dossier/multi_report.rb
Defined Under Namespace
Classes: UnsupportedFormatError
Class Attribute Summary collapse
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Model
anonymous_report, class_to_name, included, name_to_class, #persisted?, #to_key, #to_model, #to_s
Constructor Details
#initialize(options = {}) ⇒ MultiReport
Returns a new instance of MultiReport.
14
15
16
|
# File 'lib/dossier/multi_report.rb', line 14
def initialize(options = {})
self.options = options.dup.with_indifferent_access
end
|
Class Attribute Details
.reports ⇒ Object
Returns the value of attribute reports.
7
8
9
|
# File 'lib/dossier/multi_report.rb', line 7
def reports
@reports
end
|
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
4
5
6
|
# File 'lib/dossier/multi_report.rb', line 4
def options
@options
end
|
Class Method Details
.combine(*reports) ⇒ Object
10
11
12
|
# File 'lib/dossier/multi_report.rb', line 10
def self.combine(*reports)
self.reports = reports
end
|
Instance Method Details
#dom_id ⇒ Object
34
35
36
|
# File 'lib/dossier/multi_report.rb', line 34
def dom_id
nil
end
|
30
31
32
|
# File 'lib/dossier/multi_report.rb', line 30
def formatter
Module.new
end
|
#parent ⇒ Object
26
27
28
|
# File 'lib/dossier/multi_report.rb', line 26
def parent
nil
end
|
#renderer ⇒ Object
42
43
44
|
# File 'lib/dossier/multi_report.rb', line 42
def renderer
@renderer ||= Dossier::Renderer.new(self)
end
|
#reports ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/dossier/multi_report.rb', line 18
def reports
@reports ||= self.class.reports.map { |report|
report.new(options).tap { |r|
r.parent = self
}
}
end
|
#template ⇒ Object
38
39
40
|
# File 'lib/dossier/multi_report.rb', line 38
def template
'multi'
end
|