class ChupaText::Decomposer

Public Class Methods

new(options) click to toggle source
# File lib/chupa-text/decomposer.rb, line 25
def initialize(options)
  @options = options
end
registry() click to toggle source
# File lib/chupa-text/decomposer.rb, line 20
def registry
  @@registry ||= DecomposerRegistry.new
end

Public Instance Methods

decompose(data) click to toggle source
# File lib/chupa-text/decomposer.rb, line 41
def decompose(data)
  raise NotImplementedError, "must implement #{self.class}\##{__method__}"
end
target?(data) click to toggle source
# File lib/chupa-text/decomposer.rb, line 29
def target?(data)
  raise NotImplementedError, "must implement #{self.class}\##{__method__}"
end
target_score(data) click to toggle source
# File lib/chupa-text/decomposer.rb, line 33
def target_score(data)
  if target?(data)
    0
  else
    nil
  end
end