Class: EhbGameLib::Math::RectableObject::Axis
- Inherits:
-
Object
- Object
- EhbGameLib::Math::RectableObject::Axis
- Defined in:
- lib/ehb_game_lib/math/rectable_object.rb
Instance Attribute Summary collapse
-
#anchor ⇒ Object
Returns the value of attribute anchor.
Instance Method Summary collapse
- #coord ⇒ Object
- #coord=(v) ⇒ Object
-
#initialize(coord_get, coord_set, size_get) ⇒ Axis
constructor
A new instance of Axis.
- #size ⇒ Object
Constructor Details
#initialize(coord_get, coord_set, size_get) ⇒ Axis
Returns a new instance of Axis.
42 43 44 45 46 |
# File 'lib/ehb_game_lib/math/rectable_object.rb', line 42 def initialize(coord_get, coord_set, size_get) @coord_get = coord_get @coord_set = coord_set @size_get = size_get end |
Instance Attribute Details
#anchor ⇒ Object
Returns the value of attribute anchor.
40 41 42 |
# File 'lib/ehb_game_lib/math/rectable_object.rb', line 40 def anchor @anchor end |
Instance Method Details
#coord ⇒ Object
48 49 50 |
# File 'lib/ehb_game_lib/math/rectable_object.rb', line 48 def coord @coord_get.call end |
#coord=(v) ⇒ Object
52 53 54 |
# File 'lib/ehb_game_lib/math/rectable_object.rb', line 52 def coord=(v) @coord_set.call(v) end |
#size ⇒ Object
56 57 58 |
# File 'lib/ehb_game_lib/math/rectable_object.rb', line 56 def size @size_get.call end |