Module: Seamus::TextInspector

Included in:
File::Text
Defined in:
lib/seamus/inspector/text_inspector.rb

Instance Method Summary collapse

Instance Method Details

#linesObject



12
13
14
# File 'lib/seamus/inspector/text_inspector.rb', line 12

def lines
  characters.scan(/.*\n/)
end

#lines_countObject



16
17
18
# File 'lib/seamus/inspector/text_inspector.rb', line 16

def lines_count
  lines.size
end

#word_countObject



8
9
10
# File 'lib/seamus/inspector/text_inspector.rb', line 8

def word_count
  words.size
end

#wordsObject



4
5
6
# File 'lib/seamus/inspector/text_inspector.rb', line 4

def words
  characters.scan(/\S+/)
end