Sha256: 9ec67e5002ab062c204293be29048d22986180091836b0fad06f94018a5a4660

Contents?: true

Size: 365 Bytes

Versions: 1

Compression:

Stored size: 365 Bytes

Contents

require 'json'
require 'net/http'

class Eotb
  
  def initialize(api_key, host = '127.0.0.1:3000')
    @api_key = api_key
    @host = host
    @array = []
  end
  
  def to_json(array = @array)
    JSON.generate(array)
  end
  
  def register_event(actor, action, subject)
    @array << actor << action << subject
    @array.to_json
    # @array.clear
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eotb-0.0.2 lib/eotb.rb