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, StringSource

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Source

Returns a new instance of Source.



191
192
193
# File 'lib/PageTemplate/parser.rb', line 191

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

Instance Method Details

#get(name = nil) ⇒ Object



195
196
197
# File 'lib/PageTemplate/parser.rb', line 195

def get(name=nil)
  name
end