class JanioAPI::Base

Public Class Methods

new(attributes = {}, persisted = false) click to toggle source
Calls superclass method
# File lib/janio_api/resources/base.rb, line 7
def initialize(attributes = {}, persisted = false)
  # check if config host and api token is set
  unless JanioAPI.config.api_tokens || JanioAPI.config.api_token
    raise ArgumentError, "JanioAPI api_token/api_tokens is missing, please set it in the config."
  end

  unless JanioAPI.config.api_host
    raise ArgumentError, "JanioAPI api_host is missing, please set it in the config."
  end

  super
end