Class: ValRequired::RequiredHelper
Instance Attribute Summary collapse
-
#obj ⇒ Object
Returns the value of attribute obj.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/val_required.rb', line 24 def method_missing method, *args (res = obj.send(method, *args)).required! rescue BlankError raise BlankError, "#{method} returned #{res.inspect}" end |
Instance Attribute Details
#obj ⇒ Object
Returns the value of attribute obj
23 24 25 |
# File 'lib/val_required.rb', line 23 def obj @obj end |