Class: Logged::Formatter::SingleKey
- Defined in:
- lib/logged/formatter/single_key.rb
Overview
Single-Key formatter for logged
Instance Method Summary collapse
- #call(data) ⇒ Object
-
#initialize(key) ⇒ SingleKey
constructor
A new instance of SingleKey.
Constructor Details
#initialize(key) ⇒ SingleKey
Returns a new instance of SingleKey.
7 8 9 |
# File 'lib/logged/formatter/single_key.rb', line 7 def initialize(key) @key = key end |
Instance Method Details
#call(data) ⇒ Object
11 12 13 |
# File 'lib/logged/formatter/single_key.rb', line 11 def call(data) data[@key] end |