Class: RGhost::Point
Overview
Creates one point using default unit defined in RGhost::Config::GS
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, y) ⇒ Point
constructor
A new instance of Point.
- #ps ⇒ Object
Methods inherited from PsObject
#<<, #call, #graphic_scope, #raw, #set, #to_s
Constructor Details
#initialize(x, y) ⇒ Point
Returns a new instance of Point.
8 9 10 11 12 13 14 15 |
# File 'lib/rghost/point.rb', line 8 def initialize(x,y) if x.is_a? Hash point=x @x,@y=point[:x],point[:y] else @x,@y=x,y end end |
Instance Attribute Details
#x ⇒ Object
Returns the value of attribute x.
6 7 8 |
# File 'lib/rghost/point.rb', line 6 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
6 7 8 |
# File 'lib/rghost/point.rb', line 6 def y @y end |