Class: Gamefic::Sdk::Diagram::Position
- Inherits:
-
Object
- Object
- Gamefic::Sdk::Diagram::Position
- Defined in:
- lib/gamefic-sdk/diagram.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) ⇒ Position
constructor
A new instance of Position.
- #move(x, y) ⇒ Object
Constructor Details
#initialize(x = 0, y = 0) ⇒ Position
Returns a new instance of Position.
9 10 11 12 13 |
# File 'lib/gamefic-sdk/diagram.rb', line 9 def initialize x = 0, y = 0 @x = x @y = y freeze end |
Instance Attribute Details
#x ⇒ Object
Returns the value of attribute x.
7 8 9 |
# File 'lib/gamefic-sdk/diagram.rb', line 7 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
7 8 9 |
# File 'lib/gamefic-sdk/diagram.rb', line 7 def y @y end |