Class: Eggshell::ProcessorContext

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeProcessorContext

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_paramsObject (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

#blocksObject (readonly)

Returns the value of attribute blocks.



14
15
16
# File 'lib/eggshell/processor-context.rb', line 14

def blocks
  @blocks
end

#blocks_mapObject (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_cacheObject (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_handlersObject (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

#funcsObject (readonly)

Returns the value of attribute funcs.



14
15
16
# File 'lib/eggshell/processor-context.rb', line 14

def funcs
  @funcs
end

#macrosObject (readonly)

Returns the value of attribute macros.



14
15
16
# File 'lib/eggshell/processor-context.rb', line 14

def macros
  @macros
end

#varsObject (readonly)

Returns the value of attribute vars.



14
15
16
# File 'lib/eggshell/processor-context.rb', line 14

def vars
  @vars
end