Skip to content
This repository was archived by the owner on Dec 9, 2022. It is now read-only.

Commit 282480c

Browse files
author
Petros Amiridis
authored
Add dog ruby class
1 parent b7c8b18 commit 282480c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

dog.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class Dog
2+
def initialize(breed, name)
3+
# Instance variables
4+
@breed = breed
5+
@name = name
6+
end
7+
8+
def bark
9+
puts 'Ruff! Ruff!'
10+
end
11+
12+
def display
13+
puts "I am of #{@breed} breed and my name is #{@name}"
14+
end
15+
end

0 commit comments

Comments
 (0)