Module: ConvertLoop

Defined in:
lib/convertloop.rb,
lib/convertloop/client.rb,
lib/convertloop/person.rb,
lib/convertloop/event_log.rb

Overview

Ruby client of the ConvertLoop API

Defined Under Namespace

Classes: Client, EventLog, Person

Class Method Summary collapse

Class Method Details

.configure(options = {}) ⇒ Object



9
10
11
# File 'lib/convertloop.rb', line 9

def configure(options={})
  @client = ConvertLoop::Client.new(options)
end

.method_missing(method_name, *args, &block) ⇒ Object

Raises:

  • (RuntimeError)


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

def method_missing(method_name, *args, &block)
  raise RuntimeError, "Please call ConvertLoop.configure(:app_id => '...', :api_key => '...') first" if @client.nil?
  @client.send(method_name, *args, &block)
end

.reset!Object



23
24
25
# File 'lib/convertloop.rb', line 23

def reset!
  @client = nil
end

.respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (RuntimeError)


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

def respond_to_missing?(method_name, include_private=false)
  raise RuntimeError, "Please call ConvertLoop.configure(:app_id => '...', :api_key => '...') first" if @client.nil?
  @client.respond_to?(method_name, include_private)
end