module ActionControllerTweaks::Session::OptionProcessor
Public Class Methods
extract_expires_at(options)
click to toggle source
# File lib/action_controller_tweaks/session.rb, line 22 def self.extract_expires_at(options) expires_at = options.delete(:expires_at) || options.delete(:expire_at) if expires_at && expires_at.respond_to?(:to_time) expires_at = expires_at.to_time end if expires_at && !expires_at.is_a?(Time) fail InvalidOptionValue.new(:expires_at, expires_at, Time) end expires_at end
extract_expires_in(options)
click to toggle source
# File lib/action_controller_tweaks/session.rb, line 14 def self.extract_expires_in(options) expires_in = options.delete(:expires_in) || options.delete(:expire_in) if expires_in && !expires_in.is_a?(Numeric) fail InvalidOptionValue.new(:expires_in, expires_in, Numeric) end expires_in end