Method: NewRelic::Agent::Heap#initialize
- Defined in:
- lib/new_relic/agent/heap.rb
permalink #initialize(items = nil, &priority_fn) ⇒ Heap
Returns a new instance of Heap.
26 27 28 29 30 31 |
# File 'lib/new_relic/agent/heap.rb', line 26 def initialize(items = nil, &priority_fn) @items = [] @priority_fn = priority_fn || ->(x) { x } # the following line needs else branch coverage items.each { |item| push(item) } if items # rubocop:disable Style/SafeNavigation end |