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.
40 41 42 43 44 |
# File 'lib/ehb_game_lib/math/rectable_object.rb', line 40 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.
38 39 40 |
# File 'lib/ehb_game_lib/math/rectable_object.rb', line 38 def anchor @anchor end |
Instance Method Details
#coord ⇒ Object
46 47 48 |
# File 'lib/ehb_game_lib/math/rectable_object.rb', line 46 def coord @coord_get.call end |
#coord=(v) ⇒ Object
50 51 52 |
# File 'lib/ehb_game_lib/math/rectable_object.rb', line 50 def coord=(v) @coord_set.call(v) end |
#size ⇒ Object
54 55 56 |
# File 'lib/ehb_game_lib/math/rectable_object.rb', line 54 def size @size_get.call end |