Class: Ruport::ReportManager

Inherits:
Object
  • Object
show all
Defined in:
lib/ruport/util/report_manager.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.modelsObject



16
17
18
# File 'lib/ruport/util/report_manager.rb', line 16

def self.models
  @models ||= []
end

.reportsObject



20
21
22
# File 'lib/ruport/util/report_manager.rb', line 20

def self.reports
  @reports ||= []
end

Class Method Details

.[](name) ⇒ Object



12
13
14
# File 'lib/ruport/util/report_manager.rb', line 12

def self.[](name)     
  (reports + models).find{|n| n.name == name }
end

.add_model(*new_models) ⇒ Object



4
5
6
# File 'lib/ruport/util/report_manager.rb', line 4

def self.add_model(*new_models)
   self.models |= new_models
end

.add_report(*new_reports) ⇒ Object



8
9
10
# File 'lib/ruport/util/report_manager.rb', line 8

def self.add_report(*new_reports)
  self.reports |= new_reports
end