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
29
30
31
|
# File 'lib/rails/railtie/configurable.rb', line 29
def method_missing(*args, &block)
instance.send(*args, &block)
end
|
Instance Method Details
23
24
25
|
# File 'lib/rails/railtie/configurable.rb', line 23
def configure(&block)
class_eval(&block)
end
|
#inherited(base) ⇒ Object
11
12
13
|
# File 'lib/rails/railtie/configurable.rb', line 11
def inherited(base)
raise "You cannot inherit from a #{superclass.name} child"
end
|
#instance ⇒ Object
15
16
17
|
# File 'lib/rails/railtie/configurable.rb', line 15
def instance
@instance ||= new
end
|
#respond_to?(*args) ⇒ Boolean
19
20
21
|
# File 'lib/rails/railtie/configurable.rb', line 19
def respond_to?(*args)
super || instance.respond_to?(*args)
end
|