Month: February 2017

More testing

Okay this one, was a tough one:   module Ex25 # This function will break up words for me. def Ex25.break_words(stuff) words = stuff.split(' ') return words  end #sorts the words def Ex25.sort_words(words) return words.sort end  #Prints the first word after shifting it off   def Ex25.print_first_word(words) word = words.shift puts word end #Prints the … Continue reading More testing

Advertisements

Functions and Files

input_file = ARGV.first     #the first file name is typed in is input_file   def print_all(f)    #f in this case is a variable but also a file puts f.read end def rewind(f) f.seek(0)    #f.seek(0) moves to the start of the file >> to 0 bytes of the file end def print_a_line(line_count, f) … Continue reading Functions and Files

Installing Uru

Since having multiple ruby versions to work with is a huge benefit when it comes to collaborating with others , the time has come to get used to a ruby version manager like program called Uru. Uru is like RVM, rbenv, pik and chruby , a ruby environment manager. That means its possible to easily … Continue reading Installing Uru