Class: LaunchDarkly::EventOutputFormatter

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

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ EventOutputFormatter



407
408
409
410
# File 'lib/ldclient-rb/events.rb', line 407

def initialize(config)
  @inline_users = config.inline_users_in_events
  @user_filter = UserFilter.new(config)
end

Instance Method Details

#make_output_events(events, summary) ⇒ Object

Transforms events into the format used for event sending.



413
414
415
416
417
418
419
# File 'lib/ldclient-rb/events.rb', line 413

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