Module: Rails::Generator::Options

Included in:
Base, Scripts::Base
Defined in:
lib/rails_generator/options.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#optionsObject

Each instance has an options hash that’s populated by #parse.



50
51
52
# File 'lib/rails_generator/options.rb', line 50

def options
  @options ||= {}
end

Class Method Details

.append_features(base) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/rails_generator/options.rb', line 6

def self.append_features(base)
  super
  base.extend(ClassMethods)
  class << base
    if respond_to?(:inherited)
      alias_method :inherited_without_options, :inherited
    end
    alias_method :inherited, :inherited_with_options
  end
end