Class: Risu::Base::TemplateBase

Inherits:
Object
  • Object
show all
Defined in:
lib/risu/base/template_base.rb

Overview

Base template class, all report templates must be a subclass of this.

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.possible_templatesObject (readonly)

Returns the value of attribute possible_templates.



41
42
43
# File 'lib/risu/base/template_base.rb', line 41

def possible_templates
  @possible_templates
end

Instance Attribute Details

#outputObject

Returns the value of attribute output.



30
31
32
# File 'lib/risu/base/template_base.rb', line 30

def output
  @output
end

#template_infoHash

Accessors for template meta-data

Returns:

  • (Hash)

    Containing template meta-data



36
37
38
# File 'lib/risu/base/template_base.rb', line 36

def template_info
  @template_info
end

Class Method Details

.inherited(child) ⇒ Object

Adds any class that inherits from [TemplateBase] into an [Array] of possible templates for further validation.



47
48
49
# File 'lib/risu/base/template_base.rb', line 47

def self.inherited(child)
	possible_templates << child
end