Class: SnowplowTracker::SelfDescribingJson

Inherits:
Object
  • Object
show all
Defined in:
lib/snowplow-tracker/self_describing_json.rb

Instance Method Summary collapse

Constructor Details

#initialize(schema, data) ⇒ SelfDescribingJson

Returns a new instance of SelfDescribingJson.



20
21
22
23
# File 'lib/snowplow-tracker/self_describing_json.rb', line 20

def initialize(schema, data)
  @schema = schema
  @data = data
end

Instance Method Details

#to_jsonObject



25
26
27
28
29
30
# File 'lib/snowplow-tracker/self_describing_json.rb', line 25

def to_json
  {
    :schema => @schema,
    :data => @data
  }
end