Sha256: 9a8d82d30a25010865bd6d4db58d8fe0cc1f3a884b73ea5a474dac7e29349854

Contents?: true

Size: 380 Bytes

Versions: 2

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

2 entries across 2 versions & 1 rubygems

Version Path
amazon_auth-0.3.3 lib/amazon_auth/extensions/common_extension.rb
amazon_auth-0.3.2 lib/amazon_auth/extensions/common_extension.rb