module Snov

Constants

VERSION

Public Class Methods

client() click to toggle source
# File lib/snov.rb, line 6
def self.client
  if !use_fake?
    Client.new(client_id: ENV['SNOV_USER_ID'], client_secret: ENV['SNOV_SECRET'])
  else
    FakeClient.new
  end
end
use_fake?() click to toggle source
# File lib/snov.rb, line 14
def self.use_fake?
  ENV['SNOV_USE_FAKE'].present? || (!ENV.key?('SNOV_USER_ID') && !ENV.key?('SNOV_SECRET'))
end