Method: Glyph::Interpreter#initialize
- Defined in:
- lib/glyph/interpreter.rb
#initialize(text, context = {}) ⇒ Interpreter
Creates a new Glyph::Interpreter object.
14 15 16 17 18 19 |
# File 'lib/glyph/interpreter.rb', line 14 def initialize(text, context={}) @context = context @context[:source] ||= {:name => "--", :file => nil, :topic => nil} @text = text @parser = Glyph::Parser.new text, @context[:source][:name] end |