Module: Rails::Generator::Options

Included in:
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.



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

def options
  @options ||= {}
end

Class Method Details

.included(base) ⇒ Object



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

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