lib/roda/plugins/endpoints.rb in roda-endpoints-0.2.0 vs lib/roda/plugins/endpoints.rb in roda-endpoints-0.3.0

- old
+ new

@@ -54,11 +54,10 @@ opts[:container].merge(name, *args, &block) end end # `Roda::RodaRequest` instant extensions. - # rubocop:disable Metrics/ModuleLength module RequestMethods # Implements collection endpoint using given args # # @param name [Symbol] # @param item [{Symbol=>Object}] @@ -150,12 +149,11 @@ end end # @overload singleton(name, entity, type:, **kwargs) # @overload singleton(name:, entity:, type:, **kwargs) - def singleton(*args, - name: args.first, - entity: args.last, + def singleton(name, *args, + entity: args.first, type: Roda::Endpoints::Endpoint::Singleton, **kwargs) endpoint( name: name, entity: entity,