Sha256: 71e2660ed4aea2ad26a4ecffe182edbc0276ac8cfacacf4c3a94830399c6898b

Contents?: true

Size: 375 Bytes

Versions: 9

Compression:

Stored size: 375 Bytes

Contents

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

    def self.option_exists?(option)
      unless Delimiters.keys.include?(option)
        fail TypeError, "delimiter type does not exist: #{option}"
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mathematical-1.6.3 lib/mathematical/configuration.rb
mathematical-1.6.2 lib/mathematical/configuration.rb
mathematical-1.6.1 lib/mathematical/configuration.rb
mathematical-1.6.0 lib/mathematical/configuration.rb
mathematical-1.5.12 lib/mathematical/configuration.rb
mathematical-1.5.0 lib/mathematical/configuration.rb
mathematical-1.4.2 lib/mathematical/configuration.rb
mathematical-1.4.1 lib/mathematical/configuration.rb
mathematical-1.4.0 lib/mathematical/configuration.rb