Sha256: 4efaab594d37862f73c8b9e8efdbe15c592ff69cfab77cac4b9ac42ee759f286
Contents?: true
Size: 488 Bytes
Versions: 3
Compression:
Stored size: 488 Bytes
Contents
# frozen_string_literal: true require 'roda/endpoints' class Roda module Endpoints # Generic HTTP endpoint abstraction. module Repository # @param [<ROM::Struct>] _kwargs def list(**_kwargs) root.to_a end # @return [Time] def last_modified order(Sequel.desc(:updated_at)).first.updated_at end # @param [Integer] id # @return [ROM::Struct] def fetch(id) root.fetch(id) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
roda-endpoints-0.3.0 | lib/roda/endpoints/repository.rb |
roda-endpoints-0.2.0 | lib/roda/endpoints/repository.rb |
roda-endpoints-0.1.0 | lib/roda/endpoints/repository.rb |