Class: ActiveUsage::WindowStartedAt
- Inherits:
-
Object
- Object
- ActiveUsage::WindowStartedAt
- Defined in:
- lib/active_usage/window_started_at.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(finished_at, size) ⇒ WindowStartedAt
constructor
A new instance of WindowStartedAt.
Constructor Details
#initialize(finished_at, size) ⇒ WindowStartedAt
Returns a new instance of WindowStartedAt.
5 6 7 8 |
# File 'lib/active_usage/window_started_at.rb', line 5 def initialize(finished_at, size) @finished_at = finished_at @size = size end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'lib/active_usage/window_started_at.rb', line 10 def call Time.at(epoch - (epoch % @size)) end |