Module: Templator

Included in:
FeatureGenerator, StepsTemplator, User
Defined in:
lib/generators/feature/templator.rb

Instance Method Summary collapse

Instance Method Details

#render(file_path) ⇒ Object



3
4
5
6
7
# File 'lib/generators/feature/templator.rb', line 3

def render(file_path)
  root = File.expand_path('../templates', __FILE__)
  template = File.read File.join(root, file_path)
  ERB.new(template, nil, '-').result binding
end