Module: Textus::Lanes::Ingest::EntryTypes

Defined in:
lib/textus/lanes/ingest/entry_types.rb,
lib/textus/lanes/ingest/entry_types/link.rb,
lib/textus/lanes/ingest/entry_types/text.rb,
lib/textus/lanes/ingest/entry_types/asset.rb

Defined Under Namespace

Modules: Asset, Link, Text

Class Method Summary collapse

Class Method Details

.for(kind) ⇒ Object



11
12
13
# File 'lib/textus/lanes/ingest/entry_types.rb', line 11

def for(kind)
  registry[kind] or raise(ArgumentError.new("unknown ingest kind: #{kind}"))
end

.registryObject



15
16
17
18
19
20
21
# File 'lib/textus/lanes/ingest/entry_types.rb', line 15

def registry
  @registry ||= {
    "link" => Link,
    "asset" => Asset,
    "text" => Text,
  }.freeze
end