Class: Ember::Generators::InstallGenerator

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

Defined Under Namespace

Classes: ConflictingOptions, InsufficientOptions, InvalidChannel

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of InstallGenerator.



43
44
45
46
47
# File 'lib/generators/ember/install_generator.rb', line 43

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

Instance Method Details

#emberObject



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

def ember
  unless options.ember_data_only?
    get_ember_js_for(:development)
    get_ember_js_for(:production)
  end
rescue Thor::Error
  say('WARNING: no ember files on this channel or tag', :yellow)
end

#ember_dataObject



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

def ember_data
  unless options.ember_only?
    get_ember_data_for(:development)
    get_ember_data_for(:production)
  end
rescue Thor::Error
  say('WARNING: no ember-data files on this channel or tag', :yellow)
end