annotate 1-Ruby/object-all-things-2.rb @ 97:85a5e9a6ef5c

Add more notes on extracting Just/Maybe values
author IBBoard <dev@ibboard.co.uk>
date Sun, 30 Jun 2019 16:09:44 +0100
parents 8d46064c9afc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
a50d2fac49ce Add some experiments of what different objects are and what functions they have
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 #! /usr/bin/env ruby
a50d2fac49ce Add some experiments of what different objects are and what functions they have
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2
7
b8f4577db289 Add "false" and "true" to our OBJECT ALL THINGS list
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
3 objects = [ 4, 3.14, 'Pi', 'π', false, true ]
16
8d46064c9afc Be a nice Ruby user and follow block convention for do/end vs {}
IBBoard <dev@ibboard.co.uk>
parents: 7
diff changeset
4 objects.each do |obj|
6
a50d2fac49ce Add some experiments of what different objects are and what functions they have
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 puts "#{obj} (#{obj.class})"
a50d2fac49ce Add some experiments of what different objects are and what functions they have
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 obj.methods.each { |method| puts " #{method}" }
16
8d46064c9afc Be a nice Ruby user and follow block convention for do/end vs {}
IBBoard <dev@ibboard.co.uk>
parents: 7
diff changeset
7 end