Mercurial > repos > other > SevenLanguagesInSevenWeeks
comparison 1-Ruby/object-all-things-irb.output @ 5:2b423d86da51
Add script and output for checking all-values-are-objects code
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 02 Jan 2017 20:38:07 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
4:9f14e665fd1b | 5:2b423d86da51 |
---|---|
1 object-all-things.rb(main):001:0> #! /usr/bin/env ruby | |
2 object-all-things.rb(main):002:0* | |
3 object-all-things.rb(main):003:0* 4 | |
4 => 4 | |
5 object-all-things.rb(main):004:0> 4.class | |
6 => Fixnum | |
7 object-all-things.rb(main):005:0> puts 4.class | |
8 Fixnum | |
9 => nil | |
10 object-all-things.rb(main):006:0> 4 + 4 | |
11 => 8 | |
12 object-all-things.rb(main):007:0> puts 4 + 4 | |
13 8 | |
14 => nil | |
15 object-all-things.rb(main):008:0> 4.methods | |
16 => [:to_s, :inspect, :-@, :+, :-, :*, :/, :div, :%, :modulo, :divmod, :fdiv, :**, :abs, :magnitude, :==, :===, :<=>, :>, :>=, :<, :<=, :~, :&, :|, :^, :[], :<<, :>>, :to_f, :size, :bit_length, :zero?, :odd?, :even?, :succ, :integer?, :upto, :downto, :times, :next, :pred, :chr, :ord, :to_i, :to_int, :floor, :ceil, :truncate, :round, :gcd, :lcm, :gcdlcm, :numerator, :denominator, :to_r, :rationalize, :singleton_method_added, :coerce, :i, :+@, :eql?, :remainder, :real?, :nonzero?, :step, :quo, :to_c, :real, :imaginary, :imag, :abs2, :arg, :angle, :phase, :rectangular, :rect, :polar, :conjugate, :conj, :between?, :nil?, :=~, :!~, :hash, :class, :singleton_class, :clone, :dup, :taint, :tainted?, :untaint, :untrust, :untrusted?, :trust, :freeze, :frozen?, :methods, :singleton_methods, :protected_methods, :private_methods, :public_methods, :instance_variables, :instance_variable_get, :instance_variable_set, :instance_variable_defined?, :remove_instance_variable, :instance_of?, :kind_of?, :is_a?, :tap, :send, :public_send, :respond_to?, :extend, :display, :method, :public_method, :singleton_method, :define_singleton_method, :object_id, :to_enum, :enum_for, :equal?, :!, :!=, :instance_eval, :instance_exec, :__send__, :__id__] | |
17 object-all-things.rb(main):009:0> 4.methods.each { |method| puts "4.#{method}" } | |
18 4.to_s | |
19 4.inspect | |
20 4.-@ | |
21 4.+ | |
22 4.- | |
23 4.* | |
24 4./ | |
25 4.div | |
26 4.% | |
27 4.modulo | |
28 4.divmod | |
29 4.fdiv | |
30 4.** | |
31 4.abs | |
32 4.magnitude | |
33 4.== | |
34 4.=== | |
35 4.<=> | |
36 4.> | |
37 4.>= | |
38 4.< | |
39 4.<= | |
40 4.~ | |
41 4.& | |
42 4.| | |
43 4.^ | |
44 4.[] | |
45 4.<< | |
46 4.>> | |
47 4.to_f | |
48 4.size | |
49 4.bit_length | |
50 4.zero? | |
51 4.odd? | |
52 4.even? | |
53 4.succ | |
54 4.integer? | |
55 4.upto | |
56 4.downto | |
57 4.times | |
58 4.next | |
59 4.pred | |
60 4.chr | |
61 4.ord | |
62 4.to_i | |
63 4.to_int | |
64 4.floor | |
65 4.ceil | |
66 4.truncate | |
67 4.round | |
68 4.gcd | |
69 4.lcm | |
70 4.gcdlcm | |
71 4.numerator | |
72 4.denominator | |
73 4.to_r | |
74 4.rationalize | |
75 4.singleton_method_added | |
76 4.coerce | |
77 4.i | |
78 4.+@ | |
79 4.eql? | |
80 4.remainder | |
81 4.real? | |
82 4.nonzero? | |
83 4.step | |
84 4.quo | |
85 4.to_c | |
86 4.real | |
87 4.imaginary | |
88 4.imag | |
89 4.abs2 | |
90 4.arg | |
91 4.angle | |
92 4.phase | |
93 4.rectangular | |
94 4.rect | |
95 4.polar | |
96 4.conjugate | |
97 4.conj | |
98 4.between? | |
99 4.nil? | |
100 4.=~ | |
101 4.!~ | |
102 4.hash | |
103 4.class | |
104 4.singleton_class | |
105 4.clone | |
106 4.dup | |
107 4.taint | |
108 4.tainted? | |
109 4.untaint | |
110 4.untrust | |
111 4.untrusted? | |
112 4.trust | |
113 4.freeze | |
114 4.frozen? | |
115 4.methods | |
116 4.singleton_methods | |
117 4.protected_methods | |
118 4.private_methods | |
119 4.public_methods | |
120 4.instance_variables | |
121 4.instance_variable_get | |
122 4.instance_variable_set | |
123 4.instance_variable_defined? | |
124 4.remove_instance_variable | |
125 4.instance_of? | |
126 4.kind_of? | |
127 4.is_a? | |
128 4.tap | |
129 4.send | |
130 4.public_send | |
131 4.respond_to? | |
132 4.extend | |
133 4.display | |
134 4.method | |
135 4.public_method | |
136 4.singleton_method | |
137 4.define_singleton_method | |
138 4.object_id | |
139 4.to_enum | |
140 4.enum_for | |
141 4.equal? | |
142 4.! | |
143 4.!= | |
144 4.instance_eval | |
145 4.instance_exec | |
146 4.__send__ | |
147 4.__id__ | |
148 => [:to_s, :inspect, :-@, :+, :-, :*, :/, :div, :%, :modulo, :divmod, :fdiv, :**, :abs, :magnitude, :==, :===, :<=>, :>, :>=, :<, :<=, :~, :&, :|, :^, :[], :<<, :>>, :to_f, :size, :bit_length, :zero?, :odd?, :even?, :succ, :integer?, :upto, :downto, :times, :next, :pred, :chr, :ord, :to_i, :to_int, :floor, :ceil, :truncate, :round, :gcd, :lcm, :gcdlcm, :numerator, :denominator, :to_r, :rationalize, :singleton_method_added, :coerce, :i, :+@, :eql?, :remainder, :real?, :nonzero?, :step, :quo, :to_c, :real, :imaginary, :imag, :abs2, :arg, :angle, :phase, :rectangular, :rect, :polar, :conjugate, :conj, :between?, :nil?, :=~, :!~, :hash, :class, :singleton_class, :clone, :dup, :taint, :tainted?, :untaint, :untrust, :untrusted?, :trust, :freeze, :frozen?, :methods, :singleton_methods, :protected_methods, :private_methods, :public_methods, :instance_variables, :instance_variable_get, :instance_variable_set, :instance_variable_defined?, :remove_instance_variable, :instance_of?, :kind_of?, :is_a?, :tap, :send, :public_send, :respond_to?, :extend, :display, :method, :public_method, :singleton_method, :define_singleton_method, :object_id, :to_enum, :enum_for, :equal?, :!, :!=, :instance_eval, :instance_exec, :__send__, :__id__] | |
149 object-all-things.rb(main):010:0> |