Class: PageTemplate::StringSource
- 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
- #get ⇒ Object
-
#initialize(args) ⇒ StringSource
constructor
A new instance of StringSource.
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
#get ⇒ Object
211 212 213 |
# File 'lib/PageTemplate/parser.rb', line 211 def get() return @source end |