lib/xot/universal_accessor.rb in xot-0.1.27 vs lib/xot/universal_accessor.rb in xot-0.1.28
- old
+ new
@@ -18,11 +18,11 @@
get = "ua_get_#{name}__"
class_eval <<-END
alias_method :#{set}, options[:writer] || :#{name}=
alias_method :#{get}, options[:reader] || :#{name}
private :#{set}, :#{get}
- def #{name}(*args)
- #{set}(*args) unless args.empty?
+ def #{name}(*args, **kwargs)
+ #{set}(*args, **kwargs) unless args.empty? && args.empty?
#{get}
end
END
end