Module: YiffSpace::Utils::Helpers
- Defined in:
- lib/yiffspace/utils/helpers.rb
Class Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
8
9
10
11
12
13
|
# File 'lib/yiffspace/utils/helpers.rb', line 8
def method_missing(name, *, &)
helpers = ApplicationController.helpers
return helpers.public_send(name, *, &) if helpers.respond_to?(name)
super
end
|
Class Method Details
.method_missing(name) ⇒ Object
8
9
10
11
12
13
|
# File 'lib/yiffspace/utils/helpers.rb', line 8
def method_missing(name, *, &)
helpers = ApplicationController.helpers
return helpers.public_send(name, *, &) if helpers.respond_to?(name)
super
end
|
.respond_to_missing?(name, include_private = false) ⇒ Boolean
15
16
17
|
# File 'lib/yiffspace/utils/helpers.rb', line 15
def respond_to_missing?(name, include_private = false)
ApplicationController.helpers.respond_to?(name, include_private) || super
end
|