Module: MidasClient::Util
- Included in:
- Request
- Defined in:
- lib/midas_client/util.rb
Instance Attribute Summary collapse
-
#logger(progname = '[MIDAS_CLIENT]') ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
Instance Attribute Details
#logger(progname = '[MIDAS_CLIENT]') ⇒ Object
Returns the value of attribute logger.
4 5 6 |
# File 'lib/midas_client/util.rb', line 4 def logger @logger end |
Instance Method Details
#error_log(text) ⇒ Object
17 18 19 20 |
# File 'lib/midas_client/util.rb', line 17 def error_log(text) logger.level = Logger::ERROR logger.error "#{text}" end |
#log(text) ⇒ Object
12 13 14 15 |
# File 'lib/midas_client/util.rb', line 12 def log(text) logger.level = Logger::INFO logger.info "#{text}" end |
#sanitize_pci(text) ⇒ Object
22 23 24 |
# File 'lib/midas_client/util.rb', line 22 def sanitize_pci(text) CreditCardSanitizer.new(replacement_token: '@').sanitize!(text.to_s) || text end |