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 ⇒ Object
30
31
32
|
# File 'lib/rails/railtie/configurable.rb', line 30
def method_missing(...)
instance.send(...)
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
|