class Healthyr::EventAgent::Envelope

Public Class Methods

new(events) click to toggle source
# File lib/healthyr/event_agent.rb, line 23
def initialize(events)
  @events = events
end

Public Instance Methods

content() click to toggle source
# File lib/healthyr/event_agent.rb, line 27
def content
  Hash[from: instance_id, events: @events.map(&:to_hash)].to_json
end
instance_id() click to toggle source
# File lib/healthyr/event_agent.rb, line 31
def instance_id
  "#{Socket.gethostname}-#{$$}"
end