Sha256: c235e738da7ee242ef9c287d4e589ee15eb00ad508dd2c085abd85442c5117a6

Contents?: true

Size: 371 Bytes

Versions: 1

Compression:

Stored size: 371 Bytes

Contents

module ByStar
  module ByWeekend
    def by_weekend(*args)
      options = args.extract_options!.symbolize_keys!
      time = args.first
      time ||= Time.zone.now
      send("by_weekend_#{time_klass(time)}", time, options)
    end

    private

    def by_weekend_Time(time, options={})
      between(time.beginning_of_weekend, time.end_of_weekend)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
by_star-2.0.0.beta1 lib/by_star/by_weekend.rb