Class: AngularSprinkles::FormBinder::Base
- Inherits:
-
Object
- Object
- AngularSprinkles::FormBinder::Base
- Defined in:
- lib/angular_sprinkles/form_binder/base.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(_args) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(_args) ⇒ Base
Returns a new instance of Base.
4 5 6 7 8 9 10 11 12 |
# File 'lib/angular_sprinkles/form_binder/base.rb', line 4 def initialize(_args) @method = _args.fetch(:method) @args = _args.fetch(:args).dup object = _args.fetch(:object) attribute = @args.first.to_sym @attribute_binding = object.bind(attribute) end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/angular_sprinkles/form_binder/base.rb', line 14 def call # Let the original form helper raise the exception if helper_is_going_raise_argument_error? return @args end augment_args end |