Sha256: f262660c458743cfac4c4d267aa6ed0117a8e883738109c7cc025eca42043664

Contents?: true

Size: 413 Bytes

Versions: 3

Compression:

Stored size: 413 Bytes

Contents

require 'peoplefinder'

module Peoplefinder::Concerns::WorkDays
  extend ActiveSupport::Concern

  included do
    WEEK_DAYS = [
      :works_monday,
      :works_tuesday,
      :works_wednesday,
      :works_thursday,
      :works_friday
    ]

    DAYS_WORKED = [
      *WEEK_DAYS,
      :works_saturday,
      :works_sunday
    ]

    def works_weekends?
      works_saturday || works_sunday
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
peoplefinder-0.1.1 app/models/peoplefinder/concerns/work_days.rb
peoplefinder-0.1.0 app/models/peoplefinder/concerns/work_days.rb
peoplefinder-0.0.2 app/models/peoplefinder/concerns/work_days.rb