Sha256: 712348c0bdd6ec04f38f3416aea84be4d778ca57338b3a89dca65b17ed87c629

Contents?: true

Size: 459 Bytes

Versions: 3

Compression:

Stored size: 459 Bytes

Contents

# frozen_string_literal: true

require "ruby-enum"

class Configuration
  class Delimiters
    include Ruby::Enum

    define :DEFAULT, 0
    define :DOLLAR, 1
    define :DOUBLE, 2
    define :PARENS, 4
    define :BRACKETS, 8
    define :ENVIRONMENTS, 16

    class << self
      def option_exists?(option)
        unless Delimiters.key?(option)
          raise(TypeError, "delimiter type does not exist: #{option}")
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mathematical-1.6.20 lib/mathematical/configuration.rb
mathematical-1.6.18 lib/mathematical/configuration.rb
mathematical-1.6.17 lib/mathematical/configuration.rb