Class: Templater::InvocationDescription

Inherits:
Description show all
Defined in:
lib/templater/description.rb

Instance Attribute Summary

Attributes inherited from Description

#block, #name, #options

Instance Method Summary collapse

Methods inherited from Description

#initialize

Constructor Details

This class inherits a constructor from Templater::Description

Instance Method Details

#get(generator) ⇒ Object



68
69
70
71
72
73
74
75
# File 'lib/templater/description.rb', line 68

def get(generator)
  klass = generator.class.manifold.generator(name)
  if klass and block
    generator.instance_exec(klass, &block)
  elsif klass
    klass.new(generator.destination_root, generator.options, *generator.arguments)
  end
end