Sha256: 9b0aa34839b7fab824470e5365ebec4912dc7178a6f35a384aafc975baf61331

Contents?: true

Size: 429 Bytes

Versions: 4

Compression:

Stored size: 429 Bytes

Contents

require 'ruby-enum'

module CommonMarker
  # For Ruby::Enum, this must be a class, not a module
  class Config
    include Ruby::Enum

    define :default, 0
    define :sourcepos, 1
    define :hardbreaks, 2
    define :normalize, 4
    define :smart, 8

    def self.option_exists?(option)
      unless Config.keys.include?(option)
        fail StandardError, "option type does not exist #{option}"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
commonmarker-0.1.3 lib/commonmarker/config.rb
commonmarker-0.1.2 lib/commonmarker/config.rb
commonmarker-0.1.1 lib/commonmarker/config.rb
commonmarker-0.1.0 lib/commonmarker/config.rb