Class: DynamicReports::View

Inherits:
Object
  • Object
show all
Includes:
Templates
Defined in:
lib/dynamic_reports/views.rb

Constant Summary collapse

@@cached_templates =
{}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Templates

#builder, #chart_url, #commify, #csv, #erb, #haml, #linkcheck, #titleize

Constructor Details

#initialize(report) ⇒ View

Returns a new instance of View.



15
16
17
18
19
# File 'lib/dynamic_reports/views.rb', line 15

def initialize(report)
  @template = report.template
  @report   = report
  @views    = report.views
end

Instance Attribute Details

#reportObject

Returns the value of attribute report.



6
7
8
# File 'lib/dynamic_reports/views.rb', line 6

def report
  @report
end

#templateObject

Returns the value of attribute template.



6
7
8
# File 'lib/dynamic_reports/views.rb', line 6

def template
  @template
end

#viewsObject

Returns the value of attribute views.



6
7
8
# File 'lib/dynamic_reports/views.rb', line 6

def views
  @views
end

Class Method Details

.cached_templatesObject



22
23
24
# File 'lib/dynamic_reports/views.rb', line 22

def cached_templates
  @@cached_templates
end

.caller_locationsObject

TODO: Investigate if we can remove the need for caller_locations here?



28
# File 'lib/dynamic_reports/views.rb', line 28

def self.caller_locations ; [] ; end

Instance Method Details

#optionsObject



11
12
13
# File 'lib/dynamic_reports/views.rb', line 11

def options
  @options ||= {}
end