Class: RatatuiRuby::TestHelper::TestDoubles::StubRect
- Inherits:
-
Data
- Object
- Data
- RatatuiRuby::TestHelper::TestDoubles::StubRect
- Defined in:
- lib/ratatui_ruby/test_helper/test_doubles.rb
Overview
Stub rect with fixed dimensions.
- x
-
Integer left edge (default: 0).
- y
-
Integer top edge (default: 0).
- width
-
Integer width in cells (default: 80).
- height
-
Integer height in cells (default: 24).
Example
area = StubRect.new(width: 60, height: 20)
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(x: 0, y: 0, width: 80, height: 24) ⇒ StubRect
constructor
A new instance of StubRect.
Constructor Details
#initialize(x: 0, y: 0, width: 80, height: 24) ⇒ StubRect
Returns a new instance of StubRect.
80 81 82 |
# File 'lib/ratatui_ruby/test_helper/test_doubles.rb', line 80 def initialize(x: 0, y: 0, width: 80, height: 24) super end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height
79 80 81 |
# File 'lib/ratatui_ruby/test_helper/test_doubles.rb', line 79 def height @height end |
#width ⇒ Object (readonly)
Returns the value of attribute width
79 80 81 |
# File 'lib/ratatui_ruby/test_helper/test_doubles.rb', line 79 def width @width end |
#x ⇒ Object (readonly)
Returns the value of attribute x
79 80 81 |
# File 'lib/ratatui_ruby/test_helper/test_doubles.rb', line 79 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y
79 80 81 |
# File 'lib/ratatui_ruby/test_helper/test_doubles.rb', line 79 def y @y end |