Class: Dunlop::NestedLogger::BaseScope

Inherits:
Scope
  • Object
show all
Defined in:
app/services/dunlop/nested_logger.rb

Instance Attribute Summary

Attributes inherited from Scope

#entries, #label

Instance Method Summary collapse

Methods inherited from Scope

#add_scope, #empty?, #log, #pop_entries

Constructor Details

#initializeBaseScope

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_entryObject



137
138
139
# File 'app/services/dunlop/nested_logger.rb', line 137

def to_entry
  entries.map(&:to_entry).compact unless empty?
end