class ChupaText::Decomposer
Public Class Methods
Source
# File lib/chupa-text/decomposer.rb, line 25 def initialize(options) @options = options end
Source
# File lib/chupa-text/decomposer.rb, line 20 def registry @@registry ||= DecomposerRegistry.new end
Public Instance Methods
Source
# File lib/chupa-text/decomposer.rb, line 41 def decompose(data) raise NotImplementedError, "must implement #{self.class}\##{__method__}" end
Source
# File lib/chupa-text/decomposer.rb, line 29 def target?(data) raise NotImplementedError, "must implement #{self.class}\##{__method__}" end
Source
# File lib/chupa-text/decomposer.rb, line 33 def target_score(data) if target?(data) 0 else nil end end