Class: Engine::UI::Rect
- Inherits:
-
Struct
- Object
- Struct
- Engine::UI::Rect
- Defined in:
- lib/engine/ui/rect.rb
Instance Attribute Summary collapse
-
#bottom ⇒ Object
Returns the value of attribute bottom.
-
#left ⇒ Object
Returns the value of attribute left.
-
#right ⇒ Object
Returns the value of attribute right.
-
#top ⇒ Object
Returns the value of attribute top.
Instance Method Summary collapse
Instance Attribute Details
#bottom ⇒ Object
Returns the value of attribute bottom
5 6 7 |
# File 'lib/engine/ui/rect.rb', line 5 def bottom @bottom end |
#left ⇒ Object
Returns the value of attribute left
5 6 7 |
# File 'lib/engine/ui/rect.rb', line 5 def left @left end |
#right ⇒ Object
Returns the value of attribute right
5 6 7 |
# File 'lib/engine/ui/rect.rb', line 5 def right @right end |
#top ⇒ Object
Returns the value of attribute top
5 6 7 |
# File 'lib/engine/ui/rect.rb', line 5 def top @top end |
Instance Method Details
#height ⇒ Object
10 11 12 13 |
# File 'lib/engine/ui/rect.rb', line 10 def height # Y-down: bottom > top bottom - top end |
#width ⇒ Object
6 7 8 |
# File 'lib/engine/ui/rect.rb', line 6 def width right - left end |