class SplitApi::Models::BaseModel

Protected Instance Methods

auth_headers() click to toggle source
# File lib/splitapi-rb/models/base_model.rb, line 14
def auth_headers
  { Authorization: "Bearer #{@config.api_key}", content_type: :json, accept: :json }
end
to_underscore(str) click to toggle source
# File lib/splitapi-rb/models/base_model.rb, line 6
def to_underscore(str)
  str.gsub(/::/, '/').
  gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
  gsub(/([a-z\d])([A-Z])/,'\1_\2').
  tr("-", "_").
  downcase
end