123456789_123456789_123456789_123456789_123456789_

Module: Rails::Railtie::Configurable::ClassMethods

Relationships & Source Files
Defined in: railties/lib/rails/railtie/configurable.rb

Instance Attribute Summary

Instance Method Summary

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing (private)

[ GitHub ]

  
# File 'railties/lib/rails/railtie/configurable.rb', line 30

def method_missing(...)
  instance.send(...)
end

Instance Attribute Details

#config (readonly)

[ GitHub ]

  
# File 'railties/lib/rails/railtie/configurable.rb', line 11

delegate :config, to: :instance

Instance Method Details

#configure(&block)

[ GitHub ]

  
# File 'railties/lib/rails/railtie/configurable.rb', line 25

def configure(&block)
  class_eval(&block)
end

#inherited(base)

[ GitHub ]

  
# File 'railties/lib/rails/railtie/configurable.rb', line 13

def inherited(base)
  raise "You cannot inherit from a #{superclass.name} child"
end

#instance

[ GitHub ]

  
# File 'railties/lib/rails/railtie/configurable.rb', line 17

def instance
  @instance ||= new
end

#respond_to?(*args) ⇒ Boolean

[ GitHub ]

  
# File 'railties/lib/rails/railtie/configurable.rb', line 21

def respond_to?(*args)
  super || instance.respond_to?(*args)
end