Class: PageTemplate::StringSource

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

Overview

A StringSource is created with a raw string, which is returned on any call to ‘get’.

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ StringSource

Returns a new instance of StringSource.



203
204
205
206
207
208
209
210
# File 'lib/PageTemplate/parser.rb', line 203

def initialize(args)
  if args.class == String
    @source = args
  else
    @args = args
    @source = args["source"]
  end
end

Instance Method Details

#getObject



211
212
213
# File 'lib/PageTemplate/parser.rb', line 211

def get()
  return @source
end