Class: Apricot::Generator
- Inherits:
-
Rubinius::ToolSet::Runtime::Generator
- Object
- Rubinius::ToolSet::Runtime::Generator
- Apricot::Generator
- Defined in:
- lib/apricot/generator.rb
Instance Attribute Summary collapse
-
#scopes ⇒ Object
readonly
Returns the value of attribute scopes.
-
#tail_position ⇒ Object
(also: #tail_position?)
Returns the value of attribute tail_position.
Instance Method Summary collapse
- #compile_error(msg) ⇒ Object
-
#initialize ⇒ Generator
constructor
A new instance of Generator.
- #scope ⇒ Object
Constructor Details
#initialize ⇒ Generator
Returns a new instance of Generator.
8 9 10 11 12 |
# File 'lib/apricot/generator.rb', line 8 def initialize super @scopes = [] @tail_position = false end |
Instance Attribute Details
#scopes ⇒ Object (readonly)
Returns the value of attribute scopes.
3 4 5 |
# File 'lib/apricot/generator.rb', line 3 def scopes @scopes end |
#tail_position ⇒ Object Also known as: tail_position?
Returns the value of attribute tail_position.
4 5 6 |
# File 'lib/apricot/generator.rb', line 4 def tail_position @tail_position end |
Instance Method Details
#compile_error(msg) ⇒ Object
18 19 20 |
# File 'lib/apricot/generator.rb', line 18 def compile_error(msg) raise CompileError.new(file, line, msg) end |
#scope ⇒ Object
14 15 16 |
# File 'lib/apricot/generator.rb', line 14 def scope @scopes.last end |