Class: Vedeu::Interfaces::Clear Private
- Inherits:
-
Object
- Object
- Vedeu::Interfaces::Clear
- Extended by:
- Forwardable
- Includes:
- Common
- Defined in:
- lib/vedeu/interfaces/clear.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Clear the named interface.
Instance Attribute Summary collapse
-
#name ⇒ NilClass|Symbol|String
readonly
protected
private
The name of the model, the target model or the name of the associated model.
Class Method Summary collapse
-
.by_name ⇒ Array<Array<Vedeu::Cells::Char>>
private
-
.clear_by_name ⇒ Array<Array<Vedeu::Cells::Char>>
private
-
.render(name = Vedeu.focus) ⇒ Array<Array<Vedeu::Cells::Char>>
private
Instance Method Summary collapse
-
#geometry ⇒ Vedeu::Geometries::Geometry
private
private
Returns the named geometry from the geometries repository.
-
#initialize(name = Vedeu.focus) ⇒ Vedeu::Interfaces::Clear
constructor
private
Return a new instance of Vedeu::Interfaces::Clear.
-
#interface ⇒ Vedeu::Interfaces::Interface
private
private
Returns the named interface/view from the interfaces repository.
-
#output ⇒ Array<Array<Vedeu::Cells::Clear>>
private
private
For each visible line of the interface, set the foreground and background colours to those specified when the interface was defined, then starting write space characters over the area which the interface occupies.
- #render ⇒ Array<Array<Vedeu::Cells::Char>> private
Methods included from Common
#absent?, #array?, #boolean, #boolean?, #empty_value?, #escape?, #falsy?, #hash?, #line_model?, #numeric?, #positionable?, #present?, #snake_case, #stream_model?, #string?, #symbol?, #truthy?, #view_model?
Constructor Details
#initialize(name = Vedeu.focus) ⇒ Vedeu::Interfaces::Clear
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return a new instance of Vedeu::Interfaces::Clear.
42 43 44 |
# File 'lib/vedeu/interfaces/clear.rb', line 42 def initialize(name = Vedeu.focus) @name = present?(name) ? name : Vedeu.focus end |
Instance Attribute Details
#name ⇒ NilClass|Symbol|String (readonly, protected)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns The name of the model, the target model or the name of the associated model.
55 56 57 |
# File 'lib/vedeu/interfaces/clear.rb', line 55 def name @name end |
Class Method Details
.by_name ⇒ Array<Array<Vedeu::Cells::Char>>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 37 38 |
# File 'lib/vedeu/interfaces/clear.rb', line 34 def render(name = Vedeu.focus) name || Vedeu.focus new(name).render end |
.clear_by_name ⇒ Array<Array<Vedeu::Cells::Char>>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35 36 37 |
# File 'lib/vedeu/interfaces/clear.rb', line 33 def render(name = Vedeu.focus) name || Vedeu.focus new(name).render end |
.render(name = Vedeu.focus) ⇒ Array<Array<Vedeu::Cells::Char>>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 31 32 |
# File 'lib/vedeu/interfaces/clear.rb', line 28 def render(name = Vedeu.focus) name || Vedeu.focus new(name).render end |
Instance Method Details
#geometry ⇒ Vedeu::Geometries::Geometry (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the named geometry from the geometries repository.
60 61 62 |
# File 'lib/vedeu/interfaces/clear.rb', line 60 def geometry @_geometry ||= Vedeu.geometries.by_name(name) end |
#interface ⇒ Vedeu::Interfaces::Interface (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the named interface/view from the interfaces repository.
65 66 67 |
# File 'lib/vedeu/interfaces/clear.rb', line 65 def interface @_interface ||= Vedeu.interfaces.by_name(name) end |
#output ⇒ Array<Array<Vedeu::Cells::Clear>> (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
For each visible line of the interface, set the foreground and background colours to those specified when the interface was defined, then starting write space characters over the area which the interface occupies.
75 76 77 78 79 80 81 |
# File 'lib/vedeu/interfaces/clear.rb', line 75 def output Vedeu.timer("Clearing interface: '#{name}'") do @_clear ||= Vedeu::Buffers::Clear.new(height: height, name: name, width: width).buffer end end |
#render ⇒ Array<Array<Vedeu::Cells::Char>>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
47 48 49 |
# File 'lib/vedeu/interfaces/clear.rb', line 47 def render Vedeu.render_output(output) if Vedeu.ready? end |