diff --git a/lib/superstore/attribute_assignment.rb b/lib/superstore/attribute_assignment.rb index 9150d05..5ee46a1 100644 --- a/lib/superstore/attribute_assignment.rb +++ b/lib/superstore/attribute_assignment.rb @@ -1,7 +1,12 @@ module Superstore module AttributeAssignment def _assign_attribute(k, v) - public_send("#{k}=", v) if respond_to?("#{k}=") + setter = :"#{k}=" + public_send(setter, v) + rescue NoMethodError + if respond_to?(setter) + raise + end end end end