lib/servicenow.rb in servicenow-1.1.2 vs lib/servicenow.rb in servicenow-1.1.3

- old
+ new

@@ -1,9 +1,12 @@ 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 @@ -18,22 +21,18 @@ # config.username = 'foo' # end # # @yieldparam config [Servicenow::Configuration] def self.configure(&block) - if @configuration.nil? - @configuration = OpenStruct.new({}) - end + @configuration = OpenStruct.new({}) if @configuration.nil? yield @configuration end # @return [Servicenow::Configuration] def self.configuration - if @configuration.nil? - @configuration = OpenStruct.new({}) - end + @configuration = OpenStruct.new({}) if @configuration.nil? @configuration end # @param [Logger] new_logger new logger for module @@ -46,12 +45,10 @@ # @todo filter password # # @return [Logger] the module logger def self.logger - if @logger.nil? - @logger = Logger.new(STDOUT) - end + @logger = Logger.new(STDOUT) if @logger.nil? @logger end end