Help for this page

Select Code to Download


  1. or download this
    # Example simple class
    class Foo
    ...
    puts foo.bar;           # prints "Hello\n"
    foo.bar = "World";
    puts foo.bar;           # prints "World\n"
    
  2. or download this
    class Foo
      attr_accessor :bar; # Could add , :baz, :and, :others...
    ...
        @bar = aBar;
      end
    end