comparison 1-Ruby/object-all-things-2.rb @ 6:a50d2fac49ce

Add some experiments of what different objects are and what functions they have
author IBBoard <dev@ibboard.co.uk>
date Mon, 02 Jan 2017 20:45:34 +0000
parents
children b8f4577db289
comparison
equal deleted inserted replaced
5:2b423d86da51 6:a50d2fac49ce
1 #! /usr/bin/env ruby
2
3 objects = [ 4, 3.14, 'Pi', 'π']
4 objects.each { |obj|
5 puts "#{obj} (#{obj.class})"
6 obj.methods.each { |method| puts " #{method}" }
7 }