module Gekko::Serialization

Handles JSON serialization and deserialization

Public Class Methods

included(base) click to toggle source

Make our class methods available directly on Gekko::Order

# File lib/gekko/serialization.rb, line 16
def self.included(base)
  base.extend(ClassMethods)
end

Public Instance Methods

serialize() click to toggle source

Serializes a Gekko::Order as JSON

@param order [Gekko::Order] The order to serialize @return [String] The JSON string

# File lib/gekko/serialization.rb, line 44
def serialize
  Oj.dump(to_hash)
end