Class: Interscript::Compiler
- Inherits:
-
Object
- Object
- Interscript::Compiler
- Defined in:
- lib/interscript/compiler.rb
Overview
An Interscript compiler interface
Direct Known Subclasses
Defined Under Namespace
Classes: Javascript, Ruby
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
Class Method Summary collapse
Instance Method Summary collapse
-
#call ⇒ Object
Execute a map.
- #compile(map) ⇒ Object
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/interscript/compiler.rb', line 3 def code @code end |
Class Method Details
.call(map, **kwargs) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/interscript/compiler.rb', line 5 def self.call(map, **kwargs) if String === map map = Interscript::DSL.parse(map) end compiler = new compiler.compile(map, **kwargs) compiler end |
Instance Method Details
#call ⇒ Object
Execute a map
19 20 21 |
# File 'lib/interscript/compiler.rb', line 19 def call raise NotImplementedError, "Call class on #{self.class} is not implemented" end |
#compile(map) ⇒ Object
14 15 16 |
# File 'lib/interscript/compiler.rb', line 14 def compile(map) raise NotImplementedError, "Compile method on #{self.class} is not implemented" end |