Module: Rails::Railtie::Configurable::ClassMethods
- Defined in:
- lib/rails/railtie/configurable.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
31
32
33
|
# File 'lib/rails/railtie/configurable.rb', line 31
def method_missing(*args, &block)
instance.send(*args, &block)
end
|
Instance Method Details
25
26
27
|
# File 'lib/rails/railtie/configurable.rb', line 25
def configure(&block)
class_eval(&block)
end
|
#inherited(base) ⇒ Object
13
14
15
|
# File 'lib/rails/railtie/configurable.rb', line 13
def inherited(base)
raise "You cannot inherit from a #{superclass.name} child"
end
|
#instance ⇒ Object
17
18
19
|
# File 'lib/rails/railtie/configurable.rb', line 17
def instance
@instance ||= new
end
|
#respond_to?(*args) ⇒ Boolean
21
22
23
|
# File 'lib/rails/railtie/configurable.rb', line 21
def respond_to?(*args)
super || instance.respond_to?(*args)
end
|