Class: WindowTerminal::Line
- Inherits:
-
Object
- Object
- WindowTerminal::Line
- Defined in:
- lib/accu-window.rb
Overview
A class which renders a simple horizontal line on a Window.
Instance Attribute Summary collapse
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(y) ⇒ Line
constructor
Initializes a Line object.
-
#render_line(line, width, *args) ⇒ Object
Renders on the passed line and returns the modified line.
Constructor Details
#initialize(y) ⇒ Line
Initializes a Line object.
349 350 351 |
# File 'lib/accu-window.rb', line 349 def initialize(y) @y = y end |
Instance Attribute Details
#y ⇒ Object (readonly)
Returns the value of attribute y.
346 347 348 |
# File 'lib/accu-window.rb', line 346 def y @y end |
Instance Method Details
#render_line(line, width, *args) ⇒ Object
Renders on the passed line and returns the modified line.
355 356 357 |
# File 'lib/accu-window.rb', line 355 def render_line(line,width,*args) line.gsub(" ","-") end |