Class: Ember::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/ember/install_generator.rb

Defined Under Namespace

Classes: ConflictingOptions, Deprecated, InsufficientOptions, InvalidChannel

Instance Method Summary collapse

Constructor Details

#initialize(args = [], options = {}, config = {}) ⇒ InstallGenerator

Returns a new instance of InstallGenerator.



41
42
43
44
45
# File 'lib/generators/ember/install_generator.rb', line 41

def initialize(args = [], options = {}, config = {})
  super(args, options, config)
  check_options
  process_options
end

Instance Method Details

#emberObject



48
49
50
51
52
53
54
55
# File 'lib/generators/ember/install_generator.rb', line 48

def ember
  return if options.ember_data_only?

  get_ember_for(:development)
  get_ember_for(:production)
rescue Thor::Error
  say('WARNING: no ember files on this channel or tag' , :yellow)
end

#ember_dataObject



57
58
59
60
61
62
63
64
# File 'lib/generators/ember/install_generator.rb', line 57

def ember_data
  return if options.ember_only?

  get_ember_for(:development, ember_data_channel, 'ember-data')
  get_ember_for(:production, ember_data_channel, 'ember-data')
rescue Thor::Error
  say('WARNING: no ember-data files on this channel or tag' , :yellow)
end