Class: Vedeu::Buffers::Refresh Private
- Inherits:
-
Object
- Object
- Vedeu::Buffers::Refresh
- Includes:
- Common
- Defined in:
- lib/vedeu/buffers/refresh.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.
Refreshes the given named interface.
Class Method Summary collapse
-
.by_name(name = Vedeu.focus) ⇒ Array|Vedeu::Error::ModelNotFound
private
-
.refresh_content_by_name(name = Vedeu.focus) ⇒ Array|Vedeu::Error::ModelNotFound
private
Instance Method Summary collapse
-
#buffer ⇒ Vedeu::Buffers::Buffer
private
private
Returns the named buffer from the buffer repository.
- #by_name ⇒ Array|Vedeu::Error::ModelNotFound private
- #content_only? ⇒ Boolean private private
-
#defaults ⇒ Hash<Symbol => void>
private
private
The default options/attributes for a new instance of this class.
-
#initialize(name, options = {}) ⇒ Vedeu::Buffers::Refresh
constructor
private
Return a new instance of Vedeu::Buffers::Refresh.
- #name ⇒ String|Symbol private private
- #options ⇒ Hash<Symbol => Boolean> private 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, options = {}) ⇒ Vedeu::Buffers::Refresh
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::Buffers::Refresh.
39 40 41 42 |
# File 'lib/vedeu/buffers/refresh.rb', line 39 def initialize(name, = {}) @name = name @options = end |
Class Method Details
.by_name(name = Vedeu.focus) ⇒ Array|Vedeu::Error::ModelNotFound
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 21 22 |
# File 'lib/vedeu/buffers/refresh.rb', line 18 def self.by_name(name = Vedeu.focus) name ||= Vedeu.focus new(name).by_name end |
.refresh_content_by_name(name = Vedeu.focus) ⇒ Array|Vedeu::Error::ModelNotFound
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.
27 28 29 30 31 |
# File 'lib/vedeu/buffers/refresh.rb', line 27 def self.refresh_content_by_name(name = Vedeu.focus) name ||= Vedeu.focus new(name, content_only: true).by_name end |
Instance Method Details
#buffer ⇒ Vedeu::Buffers::Buffer (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 buffer from the buffer repository.
56 57 58 |
# File 'lib/vedeu/buffers/refresh.rb', line 56 def buffer Vedeu.buffers.by_name(name) end |
#by_name ⇒ Array|Vedeu::Error::ModelNotFound
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.
45 46 47 48 49 50 51 |
# File 'lib/vedeu/buffers/refresh.rb', line 45 def by_name Vedeu.trigger(:_clear_view_content_, name) buffer.render Vedeu.trigger(:_refresh_border_, name) unless content_only? end |
#content_only? ⇒ Boolean (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.
61 62 63 |
# File 'lib/vedeu/buffers/refresh.rb', line 61 def content_only? truthy?([:content_only]) 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.
76 77 78 79 80 |
# File 'lib/vedeu/buffers/refresh.rb', line 76 def defaults { content_only: false, } end |
#name ⇒ 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.
66 67 68 |
# File 'lib/vedeu/buffers/refresh.rb', line 66 def name present?(@name) ? @name : Vedeu.focus end |
#options ⇒ Hash<Symbol => Boolean> (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.
71 72 73 |
# File 'lib/vedeu/buffers/refresh.rb', line 71 def defaults.merge!(@options) end |