Module: MixTape

Defined in:
lib/mix_tape.rb,
lib/mix_tape/client.rb,
lib/mix_tape/builder.rb,
lib/mix_tape/version.rb,
lib/mix_tape/fake_tracker.rb

Defined Under Namespace

Modules: Builder Classes: FakeTracker

Constant Summary collapse

VERSION =
"0.0.6"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.console_loggingObject

Returns the value of attribute console_logging.



4
5
6
# File 'lib/mix_tape/client.rb', line 4

def console_logging
  @console_logging
end

.fakeObject

Returns the value of attribute fake.



4
5
6
# File 'lib/mix_tape/client.rb', line 4

def fake
  @fake
end

.requestObject

Returns the value of attribute request.



4
5
6
# File 'lib/mix_tape/client.rb', line 4

def request
  @request
end

.tokenObject

Returns the value of attribute token.



4
5
6
# File 'lib/mix_tape/client.rb', line 4

def token
  @token
end

Class Method Details

.clientObject

Raises:

  • (ArgumentError)


6
7
8
9
# File 'lib/mix_tape/client.rb', line 6

def client
  raise(ArgumentError, %{MixPanel token is undefined.}) if (token.nil? || token.empty?) && !fake
  @client = mix_client
end

.config(&block) ⇒ Object



11
12
13
# File 'lib/mix_tape/client.rb', line 11

def config(&block)
  instance_eval(&block)
end