class Ray::Payloads::Payload

Public Class Methods

new(*args) click to toggle source
# File lib/ray/payloads/payload.rb, line 7
def initialize(*args) end

Public Instance Methods

content() click to toggle source
# File lib/ray/payloads/payload.rb, line 13
def content
  {}
end
get_origin() click to toggle source
# File lib/ray/payloads/payload.rb, line 25
def get_origin
  Origin::OriginFactory.new.get_origin
end
to_hash() click to toggle source
# File lib/ray/payloads/payload.rb, line 17
def to_hash
  {
    type: self.type,
    content: self.content,
    origin: self.get_origin.to_hash
  }
end
type() click to toggle source
# File lib/ray/payloads/payload.rb, line 9
def type
  raise NotImplementedError, 'You must define the `type` method in your Payload'
end