Sha256: 0f4880e7df4c59cc72722a6645de8ef0f9a6eeb184c7e910f4d8d33323c2a13b
Contents?: true
Size: 1.18 KB
Versions: 1
Compression:
Stored size: 1.18 KB
Contents
require 'servicenow/version' require 'servicenow/client' require 'servicenow/change' # This module is the base for the ServiceNow gem. It's primary # interface consists of the 'configure', 'configuration' # and 'logger' methods module Servicenow @logger = nil @configuration = nil class BaseError < StandardError; end class MissingParameterError < BaseError; end # Set up Servicenow config # # @example Set up with username. Password and URL would come from environemnt # Servicenow.configure do |config| # config.username = 'foo' # end # # @yieldparam config [Servicenow::Configuration] def self.configure(&block) @configuration = OpenStruct.new({}) if @configuration.nil? yield @configuration end # @return [Servicenow::Configuration] def self.configuration @configuration = OpenStruct.new({}) if @configuration.nil? @configuration end # @param [Logger] new_logger new logger for module # # @return [Logger] def self.logger=(new_logger) @logger = new_logger end # @todo filter password # # @return [Logger] the module logger def self.logger @logger = Logger.new(STDOUT) if @logger.nil? @logger end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
servicenow-1.1.3 | lib/servicenow.rb |