Top Level Namespace

Defined Under Namespace

Modules: AARRR

Instance Method Summary collapse

Instance Method Details

#AARRR(env_or_model) ⇒ Object

helper method to initialize an AARRR session



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/aarrr.rb', line 16

def AARRR(env_or_model)
  if env_or_model.is_a?(Hash) and env_or_model["aarrr.session"]
    env_or_model["aarrr.session"]
  else
    session = AARRR::Session.new(env_or_model)

    # add to the rack env (if applicable)
    env_or_model["aarrr.session"] = session if env_or_model.is_a?(Hash)

    session
  end

end