Class: Vedeu::Buffers::Empty Private
- Inherits:
-
Object
- Object
- Vedeu::Buffers::Empty
- Includes:
- Repositories::Defaults
- Defined in:
- lib/vedeu/buffers/empty.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::Empty objects at the given height and width.
Instance Attribute Summary collapse
- #name ⇒ NilClass|String|Symbol readonly private
- #x ⇒ Fixnum readonly private
- #y ⇒ Fixnum readonly private
Instance Method Summary collapse
- #buffer ⇒ Array<Array<Vedeu::Cells::Empty>> private
-
#defaults ⇒ Hash<Symbol => void>
private
private
The default options/attributes for a new instance of this class.
- #empty ⇒ Array<Array<Vedeu::Cells::Empty>> private private
- #height ⇒ Fixnum private
- #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/empty.rb', line 18 def name @name end |
#x ⇒ Fixnum (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.
22 23 24 |
# File 'lib/vedeu/buffers/empty.rb', line 22 def x @x end |
#y ⇒ Fixnum (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.
26 27 28 |
# File 'lib/vedeu/buffers/empty.rb', line 26 def y @y end |
Instance Method Details
#buffer ⇒ Array<Array<Vedeu::Cells::Empty>>
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.
29 30 31 |
# File 'lib/vedeu/buffers/empty.rb', line 29 def buffer @buffer ||= empty 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.
46 47 48 49 50 51 52 53 54 |
# File 'lib/vedeu/buffers/empty.rb', line 46 def defaults { height: Vedeu.height, name: nil, width: Vedeu.width, x: 1, y: 1, } end |
#empty ⇒ Array<Array<Vedeu::Cells::Empty>> (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.
57 58 59 60 61 62 63 |
# File 'lib/vedeu/buffers/empty.rb', line 57 def empty Array.new(height) do Array.new(width) do Vedeu::Cells::Empty.new(name: name) end end 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.
34 35 36 |
# File 'lib/vedeu/buffers/empty.rb', line 34 def height @height + 1 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.
39 40 41 |
# File 'lib/vedeu/buffers/empty.rb', line 39 def width @width + 1 end |