lib/soaspec/exchange.rb in soaspec-0.2.4 vs lib/soaspec/exchange.rb in soaspec-0.2.5
- old
+ new
@@ -185,12 +185,10 @@
def method_missing(method_name, *args, &block)
set_value = args.first
if method_name[-1] == '=' # A setter method
getter_name = method_name[0..-2]
if set_value.class < Exchange # This would be prerequisite exchange
- define_singleton_method(getter_name) do
- set_value
- end
+ define_singleton_method(getter_name) { set_value }
self[getter_name] = set_value.id if set_value.respond_to?(:id)
else
self[getter_name] = set_value
end
else
\ No newline at end of file