Class: Mint::Secret

Inherits:
Object
  • Object
show all
Defined in:
src/mintpress-common/lib/mintpress-common/secret.rb

Overview

A class for holding a secret. The primary purpose of this class is to prevent a secret value (password, key etc.) from being accidentally exposed in logging, debug, audit, etc.

Properties (Read/Write)

Properties (Read Only)

Instance Method Summary collapse

Constructor Details

#initialize(secret_value) ⇒ Secret

Initialize a new secret with a given value. value - anything you want to keep secret from loggers, etc.

Instance Method Details

#to_sObject Also known as: inspect

Simply return '********' during implicit type conversion

#valueObject

Get the secret value.