Module: Seamus::TextInspector
- Included in:
- File::Text
- Defined in:
- lib/seamus/inspector/text_inspector.rb
Instance Method Summary collapse
Instance Method Details
#lines ⇒ Object
12 13 14 |
# File 'lib/seamus/inspector/text_inspector.rb', line 12 def lines characters.scan(/.*\n/) end |
#lines_count ⇒ Object
16 17 18 |
# File 'lib/seamus/inspector/text_inspector.rb', line 16 def lines_count lines.size end |
#word_count ⇒ Object
8 9 10 |
# File 'lib/seamus/inspector/text_inspector.rb', line 8 def word_count words.size end |
#words ⇒ Object
4 5 6 |
# File 'lib/seamus/inspector/text_inspector.rb', line 4 def words characters.scan(/\S+/) end |