Created
August 10, 2010 11:38
-
-
Save mobp/517122 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 Window | |
def initialize | |
@default = { | |
:width => 640, | |
:height => 480, | |
:title => "window" | |
} | |
end | |
def change element={} | |
@default.update element | |
end | |
end | |
win = Window.new | |
win.change :width => 1920, :height => 1080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment