Class: EmberGen::Generate

Inherits:
Object
  • Object
show all
Defined in:
lib/ember-gen/generate.rb

Constant Summary collapse

TEMPLATE_PATH =

todo - need to figure out a way to read users preferences for

javascript engine and dependency management (AMD, common.js, ES6 module, global)
then the correct template can be loaded.
There are two likely places I can think that it would be good to load these files.
  1. config/environments/development.rb
  2. from an ember-gen specific configuration file 
     I don't really like this approach, as much be it is more agnostic
File.join(File.dirname(__FILE__), 'templates')

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ Generate

Returns a new instance of Generate.



14
15
16
17
# File 'lib/ember-gen/generate.rb', line 14

def initialize(type)
  @type = type
  load_template
end

Instance Method Details



19
20
21
# File 'lib/ember-gen/generate.rb', line 19

def print_template
  puts @template_file
end