Sha256: ea0263d9cfccc92ad32bf4fbdbeb1754cce737f657a7a32e999a44e7d5c334a3

Contents?: true

Size: 346 Bytes

Versions: 3

Compression:

Stored size: 346 Bytes

Contents

module Acw
  module Helpers
    Result = Struct.new(:success?, :error, :value)

    def headers(token)
      @headers ||= {
        'Accept': 'application/json',
        'Content-Type': 'application/json',
        'Api-Token': token
      }
    end

    def result(success, error, value)
      Result.new(success, error, value)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
acw-1.3.3 lib/acw/helpers.rb
acw-1.3.2 lib/acw/helpers.rb
acw-1.3.1 lib/acw/helpers.rb