Mercurial > repos > other > SevenLanguagesInSevenWeeks
view 1-Ruby/object-all-things-2.rb @ 38:e8407d4e72dd
Add code on reflection - basically involves the object returned by "proto" message
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 13 Sep 2017 20:11:52 +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