Module: Rails::ActionMethods

Defined in:
lib/rails/generators/rails/app/app_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object (private)

TODO: Remove once this is fully in place



28
29
30
31
# File 'lib/rails/generators/rails/app/app_generator.rb', line 28

def method_missing(meth, *args, &block)
  STDERR.puts "Calling #{meth} with #{args.inspect} with #{block}"
  @generator.send(meth, *args, &block)
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



10
11
12
# File 'lib/rails/generators/rails/app/app_generator.rb', line 10

def options
  @options
end

Instance Method Details

#initialize(generator) ⇒ Object



12
13
14
15
# File 'lib/rails/generators/rails/app/app_generator.rb', line 12

def initialize(generator)
  @generator = generator
  @options   = generator.options
end