Skip to content

Instantly share code, notes, and snippets.

@pastak
Created June 2, 2013 11:05
Show Gist options
  • Select an option

  • Save pastak/5693315 to your computer and use it in GitHub Desktop.

Select an option

Save pastak/5693315 to your computer and use it in GitHub Desktop.
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