Module: Acw::Helpers

Included in:
Client
Defined in:
lib/acw/helpers.rb

Defined Under Namespace

Classes: Result

Instance Method Summary collapse

Instance Method Details

#headers(token) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/acw/helpers.rb', line 5

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

#result(success, error, value) ⇒ Object



13
14
15
# File 'lib/acw/helpers.rb', line 13

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