Module: Lara::Glossaries::FileFormat

Defined in:
lib/lara/glossaries.rb

Overview

Supported glossary file formats

Constant Summary collapse

UNIDIRECTIONAL =
"csv/table-uni"
MULTIDIRECTIONAL =
"csv/table-multi"

Class Method Summary collapse

Class Method Details

.allArray<String>

Returns All supported formats.

Returns:

  • (Array<String>)

    All supported formats



11
12
13
# File 'lib/lara/glossaries.rb', line 11

def self.all
  [UNIDIRECTIONAL, MULTIDIRECTIONAL]
end

.valid?(format) ⇒ Boolean

Returns True if the format is supported.

Parameters:

  • format (String)

    The format to validate

Returns:

  • (Boolean)

    True if the format is supported



17
18
19
# File 'lib/lara/glossaries.rb', line 17

def self.valid?(format)
  all.include?(format)
end