Tutorial by Examples

Example: s = "Hello" # s is a string Then we find out something about s. Lets begin: So you want to know what is the class of s at run time? irb(main):055:0* s.class => String Ohh, good. But what are the methods of s? irb(main):002:0> s.methods => [:unicode_normalize,...
Lets following are the class definition class A def a; end end module B def b; end end class C < A include B def c; end end What are the instance methods of C? C.instance_methods # [:c, :b, :a, :to_json, :instance_of?...] What are the instance methods that declare...

Page 1 of 1