Method: Uttk::Generators::Generator#initialize

Defined in:
lib/uttk/generators/generator.rb

#initialize(runtime_args, runtime_options = {}) ⇒ Generator

Returns a new instance of Generator.



27
28
29
30
31
32
33
34
35
# File 'lib/uttk/generators/generator.rb', line 27

def initialize ( runtime_args, runtime_options={} )
  @fullname = ENV['FULLNAME'] || raise('The FULLNAME environement variable is not set')
  @email = ENV['EMAIL'] || raise('The EMAIL environement variable is not set')
  @root = __FILE__.to_path.dirname.parent.parent.parent.expand_path.cleanpath
  @year = Time.now.year
  super(runtime_args,
        { :destination => @root.to_s }.merge!(runtime_options))
  @root = '.'.to_path
end