Class: Camera
- Inherits:
-
Object
- Object
- Camera
- Defined in:
- lib/camera.rb
Instance Attribute Summary collapse
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(x = 0, y = 0) ⇒ Camera
constructor
A new instance of Camera.
Constructor Details
#initialize(x = 0, y = 0) ⇒ Camera
Returns a new instance of Camera.
3 4 5 6 |
# File 'lib/camera.rb', line 3 def initialize(x=0,y=0) @x=x @y=y end |
Instance Attribute Details
#x ⇒ Object
Returns the value of attribute x.
2 3 4 |
# File 'lib/camera.rb', line 2 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
2 3 4 |
# File 'lib/camera.rb', line 2 def y @y end |