Sha256: a1752a56c92c8dcb95580b0dc9232988c1d3db56be2833ea4109dbcadac5a8df

Contents?: true

Size: 430 Bytes

Versions: 3

Compression:

Stored size: 430 Bytes

Contents

require 'contracts'
require 'rakuna/resource/basic'

module Rakuna
  module Resource
    # Collection Resources contain multiple resources, and can be added to.
    class Collection < Rakuna::Resource::Basic
      include Contracts

      Contract None => ArrayOf[String]
      def allowed_methods
        %w(HEAD GET POST)
      end

      Contract None => Bool
      def post_is_create?
        true
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rakuna-core-1.0.2 lib/rakuna/resource/collection.rb
rakuna-core-1.0.1 lib/rakuna/resource/collection.rb
rakuna-core-1.0.0 lib/rakuna/resource/collection.rb