Class: Linkterm::Paragraph
- Inherits:
-
Object
- Object
- Linkterm::Paragraph
- Includes:
- Enumerable
- Defined in:
- lib/linkterm.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(text) ⇒ Paragraph
constructor
A new instance of Paragraph.
Methods included from Enumerable
Constructor Details
#initialize(text) ⇒ Paragraph
Returns a new instance of Paragraph.
187 188 189 |
# File 'lib/linkterm.rb', line 187 def initialize(text) @text = text end |
Instance Method Details
#each ⇒ Object
191 192 193 194 195 196 |
# File 'lib/linkterm.rb', line 191 def each mecab = MeCab::Tagger.new("-Ochasen") mecab.parseToNode(NKF.nkf('-w', @text)).each {|node| yield node } end |