Class: SnakeGame::ImageDatabase
- Inherits:
-
Object
- Object
- SnakeGame::ImageDatabase
- Defined in:
- lib/image_database.rb
Overview
Class providing images to other classes
Instance Attribute Summary collapse
-
#bait ⇒ Object
Returns the value of attribute bait.
-
#head ⇒ Object
Returns the value of attribute head.
-
#tail ⇒ Object
Returns the value of attribute tail.
Instance Method Summary collapse
-
#initialize ⇒ ImageDatabase
constructor
A new instance of ImageDatabase.
Constructor Details
#initialize ⇒ ImageDatabase
Returns a new instance of ImageDatabase.
7 8 9 10 11 12 |
# File 'lib/image_database.rb', line 7 def initialize # puts Dir.pwd @head = Gosu::Image.new('lib/images/head.png') @tail = Gosu::Image.new('lib/images/tail.png') @bait = Gosu::Image.new('lib/images/bait.png') end |
Instance Attribute Details
#bait ⇒ Object
Returns the value of attribute bait.
6 7 8 |
# File 'lib/image_database.rb', line 6 def bait @bait end |
#head ⇒ Object
Returns the value of attribute head.
6 7 8 |
# File 'lib/image_database.rb', line 6 def head @head end |
#tail ⇒ Object
Returns the value of attribute tail.
6 7 8 |
# File 'lib/image_database.rb', line 6 def tail @tail end |