Created
June 2, 2013 11:05
-
-
Save pastak/5693315 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Purin | |
| def initialize (hp,attack,defence) | |
| @hp = hp | |
| @attack = attack | |
| @defence = defence | |
| end | |
| attr_accessor :hp | |
| attr_accessor :attack | |
| attr_accessor :defence | |
| def utau | |
| puts'♪' | |
| exec 'afplay /System/Library/Sounds/Frog.aiff' | |
| end | |
| end | |
| p = Purin.new(5,1,3) | |
| p.utau |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment