Class | PhusionPassenger::HTMLTemplate
In: | lib/phusion_passenger/html_template.rb
Parent: | Object

A convenience utility class for rendering our error pages.

### Methods

[]= new result

### Included Modules

ERB::Util

### Public Class methods

new(template_name, options = {})

[Source]

        # File lib/phusion_passenger/html_template.rb, line 31
    31:         def initialize(template_name, options = {})
    32:                 @buffer = ''
    33:                 @template = ERB.new(File.read("#{TEMPLATES_DIR}/#{template_name}.html.erb"),
    34:                         nil, nil, '@buffer')
    35:                 options.each_pair do |name, value|
    36:                         self[name] = value
    37:                 end
    38:         end

### Public Instance methods

[]=(name, value)

[Source]

        # File lib/phusion_passenger/html_template.rb, line 40
    40:         def []=(name, value)
    41:                 instance_variable_set("@#{name}".to_sym, value)
    42:                 return self
    43:         end

result()

[Source]

        # File lib/phusion_passenger/html_template.rb, line 45
    45:         def result
    46:                 return @template.result(binding)
    47:         end

[Validate]