Class: Vedeu::Buffers::View Private

Inherits:
Object
  • Object
show all
Includes:
Repositories::Defaults
Defined in:
lib/vedeu/buffers/view.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.

Allow the creation of individual named buffers for views.

Instance Method Summary collapse

Instance Method Details

#bufferVedeu::Buffers::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.



21
22
23
24
25
26
# File 'lib/vedeu/buffers/view.rb', line 21

def buffer
  @_buffer ||= Vedeu::Buffers::Empty
                 .new(height: geometry.bordered_height,
                      name:   name,
                      width:  geometry.bordered_width).buffer
end

#currentVedeu::Buffers::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.



29
30
31
# File 'lib/vedeu/buffers/view.rb', line 29

def current
  @current ||= buffer
end

#current_reset!Vedeu::Buffers::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.



34
35
36
# File 'lib/vedeu/buffers/view.rb', line 34

def current_reset!
  @current = buffer
end

#defaultsHash<Symbol => NilClass|String|Symbol] (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 Hash<Symbol => NilClass|String|Symbol].

Returns:

  • (Hash<Symbol => NilClass|String|Symbol])

    Hash<Symbol => NilClass|String|Symbol]



39
40
41
42
43
# File 'lib/vedeu/buffers/view.rb', line 39

def defaults
  {
    name: ''
  }
end

#dirtyVedeu::Buffers::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.



46
47
48
# File 'lib/vedeu/buffers/view.rb', line 46

def dirty
  @dirty ||= buffer
end

#dirty_reset!Vedeu::Buffers::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.



51
52
53
# File 'lib/vedeu/buffers/view.rb', line 51

def dirty_reset!
  @dirty = buffer
end

#geometryVedeu::Geometry::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.



16
17
18
# File 'lib/vedeu/buffers/view.rb', line 16

def geometry
  Vedeu.geometries.by_name(name)
end

#initialize(attributes = {}) ⇒ void Originally defined in module Repositories::Defaults

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.

Note:

If a particular key is missing from the attributes parameter, then it is added with the respective value from #defaults.

Returns a new instance of the class including this module.

Parameters:

  • attributes (Hash) (defaults to: {})