Class: ChupaText::Decomposer
- Inherits:
-
Object
- Object
- ChupaText::Decomposer
show all
- Defined in:
- lib/chupa-text/decomposer.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of Decomposer.
[View source]
25
26
27
|
# File 'lib/chupa-text/decomposer.rb', line 25
def initialize(options)
@options = options
end
|
Instance Method Details
permalink
#decompose(data) ⇒ Object
[View source]
41
42
43
|
# File 'lib/chupa-text/decomposer.rb', line 41
def decompose(data)
raise NotImplementedError, "must implement #{self.class}\##{__method__}"
end
|
permalink
#target?(data) ⇒ Boolean
[View source]
29
30
31
|
# File 'lib/chupa-text/decomposer.rb', line 29
def target?(data)
raise NotImplementedError, "must implement #{self.class}\##{__method__}"
end
|
permalink
#target_score(data) ⇒ Object
[View source]
33
34
35
36
37
38
39
|
# File 'lib/chupa-text/decomposer.rb', line 33
def target_score(data)
if target?(data)
0
else
nil
end
end
|