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



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

def ember
  begin
    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
end

#ember_dataObject



61
62
63
64
65
66
67
68
69
70
# File 'lib/generators/ember/install_generator.rb', line 61

def ember_data
  begin
    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
end