Module: Flurry

Defined in:
lib/flurry.rb,
lib/flurry/helper.rb,
lib/flurry/request.rb,
lib/flurry/version.rb,
lib/flurry/response.rb,
lib/flurry/configuration.rb

Defined Under Namespace

Modules: Helper Classes: Configuration, Error, Request, Response

Constant Summary collapse

VERSION =
'0.6.0'.freeze

Class Method Summary collapse

Class Method Details

.configurationObject



16
17
18
# File 'lib/flurry.rb', line 16

def configuration
  @configuration ||= Configuration.new
end

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

Start a Flurry configuration block in an initializer.

Used to provide the Flurry API access token

Yields:



12
13
14
# File 'lib/flurry.rb', line 12

def configure
  yield configuration
end

.from(table, group_by = nil) ⇒ Object

Raises:



21
22
23
24
# File 'lib/flurry.rb', line 21

def self.from(table, group_by = nil)
  raise Flurry::Error, 'a valid token must be provided before any call' if configuration.token.nil?
  Request.new(table, group_by)
end