Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/first_gem_yiyang_song.rb
Instance Method Summary collapse
Instance Method Details
#unique_words ⇒ Object
8 9 10 |
# File 'lib/first_gem_yiyang_song.rb', line 8 def unique_words self.split.uniq end |
#word_count ⇒ Object
4 5 6 |
# File 'lib/first_gem_yiyang_song.rb', line 4 def word_count self.split.count end |