Sha256: ea19158d200821648dc5ea43e18e811a85c27448d64c4881bc387d956a834f12

Contents?: true

Size: 539 Bytes

Versions: 2

Compression:

Stored size: 539 Bytes

Contents

module Apitizer
  Error = Class.new(StandardError)

  @defaults = {
    format: :json,
    adaptor: :standard,
    dictionary: {
      :index => :get,
      :show => :get,
      :create => :post,
      :update => :put,
      :delete => :delete
    },
    headers: {}
  }

  @actions = [ :index, :show, :create, :update, :delete ]
  @collection_actions = [ :index, :create ]
  @member_actions = [ :show, :update, :delete ]

  singleton_class.class_eval do
    attr_reader :defaults, :actions, :collection_actions, :member_actions
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
apitizer-0.0.3 lib/apitizer/core.rb
apitizer-0.0.2 lib/apitizer/core.rb