Class: Jbuilder
- Inherits:
-
Object
- Object
- Jbuilder
- Defined in:
- lib/jbuilder/jpartial.rb,
lib/jbuilder/jpartial/version.rb
Overview
Top level Jbuilder class
Defined Under Namespace
Modules: Jpartial
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/jbuilder/jpartial.rb', line 11 def method_missing(method_name, *args, &block) if method_name.to_s =~ /(.*)_(url|path)/ && defined? @context @context.send(method_name, *args, &block) else old_method_missing(method_name, *args, &block) end end |
Instance Method Details
#json ⇒ Object
5 6 7 |
# File 'lib/jbuilder/jpartial.rb', line 5 def json self end |
#old_method_missing ⇒ Object
9 |
# File 'lib/jbuilder/jpartial.rb', line 9 alias_method :old_method_missing, :method_missing |