Sha256: 1d8cd0ce3752532c35abb6a40e2f7964eee8e281a9f9582ac1ee345d36617573

Contents?: true

Size: 794 Bytes

Versions: 1

Compression:

Stored size: 794 Bytes

Contents

require "contiamo_event/version"
require "contiamo_event/base"

module ContiamoEvent
  class Configuration
    attr_accessor :options, :token

    def initialize
      @options = {}
      @options[:verbose] = false
      @token = ''
    end
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configure
    yield(configuration) if block_given?
  end

  def self.user(args)
    Fail 'Argument need to be a Hash' unless args.is_a? Hash
    base.post(:user, args)
  end

  def self.event(args)
    Fail 'Argument need to be a Hash' unless args.is_a? Hash
    base.post(:user, args)
  end

  def self.session(args)
    Fail 'Argument need to be a Hash' unless args.is_a? Hash
    base.post(:user, args)
  end

  def self.base
    @base ||= Base.new
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
contiamo_event-0.0.1 lib/contiamo_event.rb