module BlazerJsonAPI::Configuration

Constants

DEFAULT_NESTING_COLUMN_SEPARATOR
DEFAULT_PASSWORD
DEFAULT_USERNAME
VALID_OPTIONS_KEYS

Public Class Methods

extended(base) click to toggle source
# File lib/blazer_json_api/configuration.rb, line 14
def self.extended(base)
  base.reset_config!
end

Public Instance Methods

configure() { |self| ... } click to toggle source

Convenience method to allow configuration options to be set in a block e.g. in an initializer for the application

# File lib/blazer_json_api/configuration.rb, line 20
def configure
  yield self
end
credentials_provided?() click to toggle source
# File lib/blazer_json_api/configuration.rb, line 24
def credentials_provided?
  username.present? && password.present?
end
reset_config!() click to toggle source
# File lib/blazer_json_api/configuration.rb, line 28
def reset_config!
  self.username     = DEFAULT_USERNAME
  self.password     = DEFAULT_PASSWORD
  self.nesting_column_separator  = DEFAULT_NESTING_COLUMN_SEPARATOR
end