Cheat Sheet

Week 8

Friday, January 29, 2016

Ruby BASICS


Methods

Commonly used Methods and Enumerables. These are my favorite ones to use. They are the basic concept of programing. You can do so much with so little. All the methods I will list out will be what helped me through our Phase 0. Having the understanding of just the little things could make a big impact on learning the break down large projects.


        
          <----- Basic Methods ------->
          .to_s (put in a string)
          .reverse (reverse a string)
          .kind_of? (check of its is an _____ )
          .include? (check if it include something)
          .length (to get the lenght of string, arrays)

          <----- Enumerable Methods ------->
          .map (collect and put in Array)
          .each  (collect only)
          .each_with_indes {|key, index|} (to obtain the key and index of something)
          .max (highest integer of something)
          .min (lower integer of something)
          .sort (to sort something)