Sha256: adcee763bf67c170a94f1faf7645811611007966746052d7f287b7c574cfb226

Contents?: true

Size: 431 Bytes

Versions: 6

Compression:

Stored size: 431 Bytes

Contents

require "minuteman/time_spans"

class Minuteman
  module TimeEvents
    # Public: Helper to get all the time trackers ready
    #
    #   redis      - The Redis connection
    #   event_name - The event to be tracked
    #   date       - A given Time object
    #
    def self.start(redis, event_name, time)
      [Year, Month, Week, Day, Hour, Minute].map do |t|
        t.new(redis, event_name, time)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
minuteman-1.0.0.pre lib/minuteman/time_events.rb
minuteman-0.2.0 lib/minuteman/time_events.rb
minuteman-0.2.0.pre lib/minuteman/time_events.rb
minuteman-0.1.1 lib/minuteman/time_events.rb
minuteman-0.1.0 lib/minuteman/time_events.rb
minuteman-0.0.2 lib/minuteman/time_events.rb