Sha256: 9d7af747b72321c82db6003b368dc726b9a714bb6995c3099e333822f9486ed4

Contents?: true

Size: 881 Bytes

Versions: 1

Compression:

Stored size: 881 Bytes

Contents

# frozen_string_literal: true

# File: constants.rb
# Purpose: definition of Rley constants.

module Rley # Module used as a namespace
  # The version number of the gem.
  Version = '0.8.00'

  # Brief description of the gem.
  Description = "Ruby implementation of the Earley's parsing algorithm"

  # Constant Rley::RootDir contains the absolute path of Rley's
  # start directory. Note: it also ends with a slash character.
  unless defined?(RootDir)
    # The initialisation of constant RootDir is guarded in order
    # to avoid multiple initialisation (not allowed for constants)

    # The start folder of Rley.
    RootDir = begin
      require 'pathname' # Load Pathname class from standard library
      startdir = Pathname(__FILE__).dirname.parent.parent.expand_path
      "#{startdir}/" # Append trailing slash character to it
    end
  end
end # module

# End of file

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rley-0.8.00 lib/rley/constants.rb