class Configure::TemplateDir

An extraction of the template file/directory for the generator… This way it can be separated, redefined, and tested.

Attributes

d[R]

Public Class Methods

new(component, language, template) click to toggle source
# File lib/ngi/configure.rb, line 55
def initialize(component, language, template)
  @d = "#{Utils::CurrentDir.dir}/templates/"
  @d << "#{component['type']}/#{language}"
  @d << "/user/#{template}"
end

Public Instance Methods

read() click to toggle source
# File lib/ngi/configure.rb, line 61
def read
  f = File.open(@d)
  content = f.read
  f.close

  content
end