Module: Rails::AutomaticLogout::Controllers::Helpers
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/rails/automaticlogout/controllers/helpers.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#current_time ⇒ Object
9 10 11 |
# File 'lib/rails/automaticlogout/controllers/helpers.rb', line 9 def current_time Time.now end |
#expires_at(time) ⇒ Object
13 14 15 |
# File 'lib/rails/automaticlogout/controllers/helpers.rb', line 13 def expires_at(time) current_time + time end |
#expires_at_in_seconds(time) ⇒ Object
17 18 19 |
# File 'lib/rails/automaticlogout/controllers/helpers.rb', line 17 def expires_at_in_seconds(time) time.seconds.to_i end |