Class: ChupaText::DecomposerRegistry

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/chupa-text/decomposer-registry.rb

Instance Method Summary collapse

Constructor Details

#initializeDecomposerRegistry



21
22
23
# File 'lib/chupa-text/decomposer-registry.rb', line 21

def initialize
  @decomposer_classes = {}
end

Instance Method Details

#each(&block) ⇒ Object



33
34
35
# File 'lib/chupa-text/decomposer-registry.rb', line 33

def each(&block)
  @decomposer_classes.each(&block)
end

#find(name) ⇒ Object



29
30
31
# File 'lib/chupa-text/decomposer-registry.rb', line 29

def find(name)
  @decomposer_classes[name]
end

#register(name, decomposer_class) ⇒ Object



25
26
27
# File 'lib/chupa-text/decomposer-registry.rb', line 25

def register(name, decomposer_class)
  @decomposer_classes[name] = decomposer_class
end