Title / Description
Code irb(main):001:0> class Foo irb(main):002:1> def foo irb(main):003:2> "foo" irb(main):004:2> end irb(main):005:1> end => nil irb(main):006:0> module X irb(main):007:1> class Foo irb(main):008:2> def foo irb(main):009:3> "bar" irb(main):010:3> end irb(main):011:2> end irb(main):012:1> end => nil irb(main):013:0> f = Foo.new^C irb(main):013:0> Foo.new.foo => "foo" irb(main):014:0> X::Foo.new.foo => "bar" irb(main):015:0> include X => Object irb(main):016:0> Foo => Foo irb(main):017:0> Foo.new.foo => "foo"
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code