Module: Roda::RodaPlugins::ConditionalSessions::RequestMethods

Defined in:
lib/roda/plugins/conditional_sessions.rb

Instance Method Summary collapse

Instance Method Details

#persist_session(headers, session) ⇒ Object

Do nothing if not using sessions.



59
60
61
# File 'lib/roda/plugins/conditional_sessions.rb', line 59

def persist_session(headers, session)
  super if use_sessions?
end

#sessionObject

Raise RodaError if not using sessions.

Raises:



41
42
43
44
# File 'lib/roda/plugins/conditional_sessions.rb', line 41

def session
  raise RodaError, "session called on request not using sessions" unless use_sessions?
  super
end

#session_created_atObject

Raise RodaError if not using sessions.

Raises:



47
48
49
50
# File 'lib/roda/plugins/conditional_sessions.rb', line 47

def session_created_at
  raise RodaError, "session_created_at called on request not using sessions" unless use_sessions?
  super
end

#session_updated_atObject

Raise RodaError if not using sessions.

Raises:



53
54
55
56
# File 'lib/roda/plugins/conditional_sessions.rb', line 53

def session_updated_at
  raise RodaError, "session_updated_at called on request not using sessions" unless use_sessions?
  super
end