Class: Dunlop::NestedLogger::BaseScope
- Defined in:
- app/services/dunlop/nested_logger.rb
Instance Attribute Summary
Attributes inherited from Scope
Instance Method Summary collapse
-
#initialize ⇒ BaseScope
constructor
A new instance of BaseScope.
- #to_entry ⇒ Object
Methods inherited from Scope
#add_scope, #empty?, #log, #pop_entries
Constructor Details
#initialize ⇒ BaseScope
Returns a new instance of BaseScope.
134 135 136 |
# File 'app/services/dunlop/nested_logger.rb', line 134 def initialize @entries = [] end |
Instance Method Details
#to_entry ⇒ Object
137 138 139 |
# File 'app/services/dunlop/nested_logger.rb', line 137 def to_entry entries.map(&:to_entry).compact unless empty? end |