lib/acfs/model/service.rb in acfs-0.21.0 vs lib/acfs/model/service.rb in acfs-0.21.1.b189

- old
+ new

@@ -31,11 +31,11 @@ # # @param [ Class ] klass Service class derived from {Acfs::Service}. # @param [ Object ] options Option delegated to service class initializer. # def service(klass = nil, options = {}) - return @service unless klass - @service = klass.new options + return (@service = klass.new options) if klass + @service || superclass.service end end end end