Class: Eggshell::ProcessorContext
- Inherits:
-
Object
- Object
- Eggshell::ProcessorContext
- Defined in:
- lib/eggshell/processor-context.rb
Overview
Holds things like variables, line/char count, and other useful information for a {Processor} instance.
Instance Attribute Summary collapse
-
#block_params ⇒ Object
readonly
Returns the value of attribute block_params.
-
#blocks ⇒ Object
readonly
Returns the value of attribute blocks.
-
#blocks_map ⇒ Object
readonly
Returns the value of attribute blocks_map.
-
#expr_cache ⇒ Object
readonly
Returns the value of attribute expr_cache.
-
#fmt_handlers ⇒ Object
readonly
Returns the value of attribute fmt_handlers.
-
#funcs ⇒ Object
readonly
Returns the value of attribute funcs.
-
#macros ⇒ Object
readonly
Returns the value of attribute macros.
-
#vars ⇒ Object
readonly
Returns the value of attribute vars.
Instance Method Summary collapse
-
#initialize ⇒ ProcessorContext
constructor
A new instance of ProcessorContext.
Constructor Details
#initialize ⇒ ProcessorContext
Returns a new instance of ProcessorContext.
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/eggshell/processor-context.rb', line 3 def initialize @vars = {:references => {}, :toc => [], :include_paths => [], 'log.level' => 1} @funcs = {} @macros = {} @blocks = [] @blocks_map = {} @block_params = {} @expr_cache = {} @fmt_handlers = {} end |
Instance Attribute Details
#block_params ⇒ Object (readonly)
Returns the value of attribute block_params.
14 15 16 |
# File 'lib/eggshell/processor-context.rb', line 14 def block_params @block_params end |
#blocks ⇒ Object (readonly)
Returns the value of attribute blocks.
14 15 16 |
# File 'lib/eggshell/processor-context.rb', line 14 def blocks @blocks end |
#blocks_map ⇒ Object (readonly)
Returns the value of attribute blocks_map.
14 15 16 |
# File 'lib/eggshell/processor-context.rb', line 14 def blocks_map @blocks_map end |
#expr_cache ⇒ Object (readonly)
Returns the value of attribute expr_cache.
14 15 16 |
# File 'lib/eggshell/processor-context.rb', line 14 def expr_cache @expr_cache end |
#fmt_handlers ⇒ Object (readonly)
Returns the value of attribute fmt_handlers.
14 15 16 |
# File 'lib/eggshell/processor-context.rb', line 14 def fmt_handlers @fmt_handlers end |
#funcs ⇒ Object (readonly)
Returns the value of attribute funcs.
14 15 16 |
# File 'lib/eggshell/processor-context.rb', line 14 def funcs @funcs end |
#macros ⇒ Object (readonly)
Returns the value of attribute macros.
14 15 16 |
# File 'lib/eggshell/processor-context.rb', line 14 def macros @macros end |
#vars ⇒ Object (readonly)
Returns the value of attribute vars.
14 15 16 |
# File 'lib/eggshell/processor-context.rb', line 14 def vars @vars end |