class RS4::Configuration

Attributes

api_host[RW]
errors[RW]
private_api_key[RW]
request_handler[RW]

Public Instance Methods

valid?() click to toggle source
# File lib/rs4/configuration.rb, line 19
def valid?
  @errors = []

  @errors << '`private_api_key` not set' unless private_api_key.present?
  @errors << '`api_host` not set' unless api_host.present?

  if @errors.any?
    Rails.logger.error("RS4 Configuration Invalid: #{@errors.join(',')}")
    return false
  else
    return true
  end
end