Sha256: c7a0a3ba3af7fa0c11b194616ac1be6237606b0de5ce39dd4458f7ccd9b14dc0

Contents?: true

Size: 380 Bytes

Versions: 5

Compression:

Stored size: 380 Bytes

Contents

module AmazonAuth
  module CommonExtension
    def log(message)
      return unless (@options[:debug] || @options[:verbose])
      puts "[#{Time.current.strftime('%Y-%m-%d %H:%M:%S')}] #{message}" +
        (@options[:debug] && @session ? " -- #{session.current_url}" : '')
    end

    def debug(message)
      return unless @options[:debug]
      log(message)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
amazon_auth-0.8.0 lib/amazon_auth/extensions/common_extension.rb
amazon_auth-0.7.0 lib/amazon_auth/extensions/common_extension.rb
amazon_auth-0.6.0 lib/amazon_auth/extensions/common_extension.rb
amazon_auth-0.5.0 lib/amazon_auth/extensions/common_extension.rb
amazon_auth-0.4.6 lib/amazon_auth/extensions/common_extension.rb