Permalink
Browse files

dogclass add

  • Loading branch information...
1 parent c096942 commit 780965b07ab48d5dda53998e1ec3fdce7b4c794f @luchmhor luchmhor committed with Feb 22, 2012
Showing with 22 additions and 0 deletions.
  1. +22 −0 dogclass.rb
View
22 dogclass.rb
@@ -0,0 +1,22 @@
+class Dog
+ def initialize (name)
+ @name = name
+ end
+
+ def bark
+ "Ruff"
+ end
+
+ def eat
+ "Chowchow"
+ end
+
+ def chase_cat
+ "Arararar"
+ end
+end
+
+d = Dog.new('Leo')
+puts d.bark
+puts d.eat
+puts d.chase_cat

0 comments on commit 780965b

Please sign in to comment.