Class: PageTemplate::Source

Inherits:
Object
  • Object
show all
Defined in:
lib/PageTemplate/parser.rb

Overview

A Source is a source from which templates are drawn.

Source#get(name) must return the body of the template that is to be parsed, or nil if it doesn’t exist.

Direct Known Subclasses

FileSource

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Source

Returns a new instance of Source.



175
176
177
# File 'lib/PageTemplate/parser.rb', line 175

def initialize(args = {})
  @args  = args
end

Instance Method Details

#get(name) ⇒ Object



178
179
180
# File 'lib/PageTemplate/parser.rb', line 178

def get(name)
  name
end