Module: Pfm::Generator

Defined in:
lib/iapi-idlc-sdk-pfm/generator.rb

Defined Under Namespace

Modules: TemplateHelper Classes: Context

Class Method Summary collapse

Class Method Details

.add_attr_to_context(name, value = nil) ⇒ Object



33
34
35
36
37
38
# File 'lib/iapi-idlc-sdk-pfm/generator.rb', line 33

def self.add_attr_to_context(name, value = nil)
  sym_name = name.to_sym
  Pfm::Generator::Context.add_attr(sym_name)
  Pfm::Generator::TemplateHelper.delegate_to_app_context(sym_name)
  context.public_send("#{sym_name}=", value)
end

.contextObject



29
30
31
# File 'lib/iapi-idlc-sdk-pfm/generator.rb', line 29

def self.context
  @context ||= Context.new
end

.resetObject



25
26
27
# File 'lib/iapi-idlc-sdk-pfm/generator.rb', line 25

def self.reset
  @context = nil
end