January 13, 2016 by Daniel P. Clark

101 Ruby Code Factoids

0) ‘methods’ method Since almost everything in Ruby is an Object you can type dot methods on it to see what methods are available. 4.methods – Object.methods # => [:-@, :+, :-, :*, :/, :div, :%, :modulo, :divmod, :fdiv, :**, :abs, :magnitude, :~, :&, :|, :^, :[], :<<, :>>, :to_f, :size, :bit_length, :zero?, :odd?, :even?,…

Continue Reading »