Sha256: a7ebb3d3dc4e6a62f120026627c06beccbcb009ccbd5ee9bb35830caa830d396

Contents?: true

Size: 477 Bytes

Versions: 2

Compression:

Stored size: 477 Bytes

Contents

module Nextday
 
  ##
  # The time a warehouse or other shop closes. Used
  # to specify which day an item will be despatched.
  CUT_OFF_TIME = "16:00"
  
  class Config
    
    class << self
      attr_writer :cut_off_time
      
      def cut_off_time
        @cut_off_time || CUT_OFF_TIME
      end
      
      def cut_off_hour
        cut_off_time.split(":")[0].to_i
      end

      def cut_off_minute
        cut_off_time.split(":")[1].to_i
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nextday-0.4.0 lib/nextday/config.rb
nextday-0.3.0 lib/nextday/config.rb