Class: Vedeu::Buffers::Clear Private
- Inherits:
-
Object
- Object
- Vedeu::Buffers::Clear
- Includes:
- Repositories::Defaults
- Defined in:
- lib/vedeu/buffers/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.
Provides a grid of Vedeu::Cells::Clear objects at the given height and width.
Instance Attribute Summary collapse
- #name ⇒ NilClass|String|Symbol readonly private
Instance Method Summary collapse
- #buffer ⇒ Array<Array<Vedeu::Cells::Clear>> private
- #clear ⇒ Array<Array<Vedeu::Cells::Clear>> private private
-
#defaults ⇒ Hash<Symbol => void>
private
private
The default options/attributes for a new instance of this class.
- #height ⇒ Fixnum private
-
#interface ⇒ Vedeu::Interfaces::Interface
private
private
Returns the named interface/view from the interfaces repository.
- #width ⇒ Fixnum private
Methods included from Repositories::Defaults
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?
Instance Attribute Details
#name ⇒ NilClass|String|Symbol (readonly)
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.
18 19 20 |
# File 'lib/vedeu/buffers/clear.rb', line 18 def name @name end |
Instance Method Details
#buffer ⇒ Array<Array<Vedeu::Cells::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.
21 22 23 |
# File 'lib/vedeu/buffers/clear.rb', line 21 def buffer @buffer ||= clear end |
#clear ⇒ 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.
52 53 54 55 56 57 58 |
# File 'lib/vedeu/buffers/clear.rb', line 52 def clear Array.new(height) do Array.new(width) do Vedeu::Cells::Clear.new(colour: interface.colour, name: name) end end end |
#defaults ⇒ Hash<Symbol => void> (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.
The default options/attributes for a new instance of this class.
43 44 45 46 47 48 49 |
# File 'lib/vedeu/buffers/clear.rb', line 43 def defaults { height: Vedeu.height, name: nil, width: Vedeu.width, } end |
#height ⇒ Fixnum
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.
26 27 28 |
# File 'lib/vedeu/buffers/clear.rb', line 26 def height @height + 1 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.
38 39 40 |
# File 'lib/vedeu/buffers/clear.rb', line 38 def interface @_interface ||= Vedeu.interfaces.by_name(name) end |
#width ⇒ Fixnum
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.
31 32 33 |
# File 'lib/vedeu/buffers/clear.rb', line 31 def width @width + 1 end |