view 1-Ruby/object-all-things-2.rb @ 59:f86bb0d669be

Add a quick bit of maths code (list counting/summing)
author IBBoard <dev@ibboard.co.uk>
date Wed, 27 Sep 2017 20:19:01 +0100
parents 8d46064c9afc
children
line wrap: on
line source

#! /usr/bin/env ruby

objects = [ 4, 3.14, 'Pi', 'π', false, true ]
objects.each do |obj|
	puts "#{obj} (#{obj.class})"
	obj.methods.each { |method| puts "    #{method}" }
end