Class: JsonObjectFormat

Inherits:
Format
  • Object
show all
Defined in:
lib/jsonobjectformat.rb

Overview

The JSON object format used for publishing messages to Fanout.io.

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ JsonObjectFormat

Initialize with a value representing the message to be sent.



14
15
16
# File 'lib/jsonobjectformat.rb', line 14

def initialize(value)
  @value = value
end

Instance Method Details

#exportObject

The method used to export the format data.



24
25
26
# File 'lib/jsonobjectformat.rb', line 24

def export
  return @value
end

#nameObject

The name of the format.



19
20
21
# File 'lib/jsonobjectformat.rb', line 19

def name
  return 'json-object'
end