lib/roda/endpoints/endpoint/data.rb in roda-endpoints-0.2.0 vs lib/roda/endpoints/endpoint/data.rb in roda-endpoints-0.3.0

- old
+ new

@@ -7,10 +7,12 @@ # Accessing data inside of endpoint. module Data # @param name [String] # @param repository [String] # @param attributes [{Symbol=>Object}] - def initialize(name:, repository: "repositories.#{name}", **attributes) + def initialize(name:, + repository: "repositories.#{Inflecto.pluralize(name)}", + **attributes) @repository_key = repository super(name: name, **attributes) end # @return [String]