Class: Gliner::Config::EntityTypes

Inherits:
Object
  • Object
show all
Defined in:
lib/gliner/config/entity_types.rb

Class Method Summary collapse

Class Method Details

.parse(entity_types) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/gliner/config/entity_types.rb', line 7

def parse(entity_types)
  case entity_types
  when Array
    list_config(entity_types)
  when String, Symbol
    list_config([entity_types])
  when Hash
    hash_config(entity_types)
  else
    raise Error, 'labels must be a String, Array, or Hash'
  end
end