Class: LaunchDarkly::EventOutputFormatter Private

Inherits:
Object
  • Object
show all
Defined in:
lib/ldclient-rb/events.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary collapse

FEATURE_KIND =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'feature'
IDENTIFY_KIND =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'identify'
CUSTOM_KIND =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'custom'
INDEX_KIND =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'index'
DEBUG_KIND =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'debug'
MIGRATION_OP_KIND =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'migration_op'
SUMMARY_KIND =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'summary'

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ EventOutputFormatter

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of EventOutputFormatter.



500
501
502
# File 'lib/ldclient-rb/events.rb', line 500

def initialize(config)
  @context_filter = LaunchDarkly::Impl::ContextFilter.new(config.all_attributes_private, config.private_attributes, config.logger)
end

Instance Method Details

#make_output_events(events, summary) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Transforms events into the format used for event sending.



505
506
507
508
509
510
511
# File 'lib/ldclient-rb/events.rb', line 505

def make_output_events(events, summary)
  events_out = events.map { |e| make_output_event(e) }
  unless summary.counters.empty?
    events_out.push(make_summary_event(summary))
  end
  events_out
end