class String

this adds functionality to the existing ruby String class

Public Instance Methods

unique_words() click to toggle source
# File lib/first_gem_anna.rb, line 9
def unique_words
        self.split.uniq
end
word_count() click to toggle source
# File lib/first_gem_anna.rb, line 5
def word_count
        self.split.count
end