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.
9 10 11 12 13 |
# File 'lib/logged/formatter/single_key.rb', line 9 def initialize(key) super() @key = key end |
Instance Method Details
#call(data) ⇒ Object
15 16 17 |
# File 'lib/logged/formatter/single_key.rb', line 15 def call(data) data[@key] end |