Created
August 25, 2009 01:40
-
-
Save Neurogami/174387 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
attr_accessor :baz, :biff | |
def initialize baz, biff | |
@baz, @biff = baz, biff | |
end | |
end | |
# Create an instance | |
f = Foo.new "bling", "blang" | |
# Access the state | |
puts f.baz | |
puts f.biff | |
f.biff = "Blong!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment