Module: RQ::Job::Methods
- Defined in:
- lib/rq-0.1.7/job.rb
Overview
{{{
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
{{{
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rq-0.1.7/job.rb', line 14 def method_missing(meth, *args, &block) #{{{ setpat = %r/=$/o meth = "#{ meth }" setter = meth =~ setpat meth.gsub! setpat, '' if fields.include? "#{ meth }" if setter self.send('[]=', meth, *args, &block) else self.send('[]', meth, *args, &block) end else super end #}}} end |