Module: ESHQ

Defined in:
lib/eshq.rb,
lib/eshq/client.rb,
lib/eshq/version.rb,
lib/eshq/configuration.rb

Defined Under Namespace

Classes: Client, Configuration

Constant Summary collapse

VERSION =
"0.0.9"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



7
8
9
# File 'lib/eshq.rb', line 7

def configuration
  @configuration
end

Class Method Details

.clientObject



10
11
12
# File 'lib/eshq.rb', line 10

def self.client
  @@client ||= Client.new
end

.configure {|configuration| ... } ⇒ Object

Yields:



27
28
29
30
# File 'lib/eshq.rb', line 27

def self.configure
  self.configuration ||= Configuration.new
  yield(configuration) if block_given?
end

.open(options) ⇒ Object



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

def self.open(options)
  client.post("/socket", options)["socket"]
end

.reset_clientObject



14
15
16
17
# File 'lib/eshq.rb', line 14

def self.reset_client
  self.configuration = nil
  @@client = nil
end

.send(options) ⇒ Object



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

def self.send(options)
  client.post("/event", options)
end