Class: Terraspace::Compiler::Erb::Context

Inherits:
Object
  • Object
show all
Includes:
Helpers, HelperExtender
Defined in:
lib/terraspace/compiler/erb/context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Dependencies::Helpers

#depends_on, #each_depends_on, #output

Methods included from Util::Logging

#logger

Constructor Details

#initialize(mod) ⇒ Context

Returns a new instance of Context.



7
8
9
10
11
# File 'lib/terraspace/compiler/erb/context.rb', line 7

def initialize(mod)
  @mod = mod
  @options = mod.options # so user has access to cli options
  extend_module_level_helpers
end

Instance Attribute Details

#modObject (readonly)

Returns the value of attribute mod.



6
7
8
# File 'lib/terraspace/compiler/erb/context.rb', line 6

def mod
  @mod
end

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/terraspace/compiler/erb/context.rb', line 6

def options
  @options
end