Sha256: 0064f65d45c612697480a8512c4c9b0d1c7c8041ee755e57fae3659b3932bc30

Contents?: true

Size: 1.41 KB

Versions: 38

Compression:

Stored size: 1.41 KB

Contents

# frozen_string_literal: true

module Doing
  module Types
    REGEX_CASE = /^[cis].*?$/i.freeze
    REGEX_TAG_SORT = /^(?:n(?:ame)?|t(?:ime)?)$/i.freeze
    REGEX_BOOL = /^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$/i.freeze
    REGEX_SORT_ORDER = /^(?:a(?:sc)?|d(?:esc)?)$/i.freeze
    REGEX_VALUE_QUERY = /^(?:!)?@?(?:\S+) +(?:!?[<>=][=*]?|[$*^]=) +(?:.*?)$/.freeze
    REGEX_CLOCK = '(?:\d{1,2}+(?::\d{1,2}+)?(?: *(?:am|pm))?|midnight|noon)'
    REGEX_TIME = /^#{REGEX_CLOCK}$/i.freeze
    REGEX_DAY = /^(mon|tue|wed|thur?|fri|sat|sun)(\w+(day)?)?$/i.freeze
    REGEX_RANGE_INDICATOR = ' +(?:to|through|thru|(?:un)?til|-+) +'
    REGEX_RANGE = /^\S+.*?#{REGEX_RANGE_INDICATOR}\S+.*?$/i.freeze
    REGEX_TIME_RANGE = /^#{REGEX_CLOCK}(?:#{REGEX_RANGE_INDICATOR}#{REGEX_CLOCK})?$/i.freeze

    InvalidExportType = Class.new(RuntimeError)
    MissingConfigFile = Class.new(RuntimeError)

    AgeSymbol = Class.new(String)
    BooleanSymbol = Class.new(Symbol)
    CaseSymbol = Class.new(Symbol)
    DateBeginString = Class.new(DateTime)
    DateEndString = Class.new(DateTime)
    DateIntervalString = Class.new(DateTime)
    DateRangeOptionalString = Class.new(Array)
    DateRangeString = Class.new(Array)
    ExportTemplate = Class.new(String)
    MatchingSymbol = Class.new(Symbol)
    OrderSymbol = Class.new(Symbol)
    TagArray = Class.new(Array)
    TagSortSymbol = Class.new(Symbol)
    TemplateName = Class.new(String)
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
doing-2.1.88 lib/doing/types.rb
doing-2.1.87 lib/doing/types.rb
doing-2.1.86 lib/doing/types.rb
doing-2.1.85 lib/doing/types.rb
doing-2.1.84 lib/doing/types.rb
doing-2.1.83 lib/doing/types.rb
doing-2.1.82 lib/doing/types.rb
doing-2.1.81 lib/doing/types.rb
doing-2.1.80 lib/doing/types.rb
doing-2.1.79 lib/doing/types.rb
doing-2.1.78 lib/doing/types.rb
doing-2.1.77 lib/doing/types.rb
doing-2.1.76 lib/doing/types.rb
doing-2.1.75 lib/doing/types.rb
doing-2.1.74 lib/doing/types.rb
doing-2.1.73 lib/doing/types.rb
doing-2.1.72 lib/doing/types.rb
doing-2.1.69 lib/doing/types.rb
doing-2.1.68 lib/doing/types.rb
doing-2.1.66 lib/doing/types.rb