Class: Vedeu::Buffers::Refresh
- Inherits:
-
Object
- Object
- Vedeu::Buffers::Refresh
- Includes:
- Common
- Defined in:
- lib/vedeu/buffers/refresh.rb
Overview
Refreshes the given named interface.
Class Method Summary collapse
-
.by_name(name = Vedeu.focus) ⇒ Array|Vedeu::Error::ModelNotFound
-
.refresh_content_by_name(name = Vedeu.focus) ⇒ Array|Vedeu::Error::ModelNotFound
Instance Method Summary collapse
-
#absent?(variable) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether a variable is nil or empty.
-
#become(klass, attributes) ⇒ Class
included
from Common
private
Converts one class into another.
-
#boolean(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating the value was a boolean.
-
#boolean?(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether the value is a Boolean.
- #buffer ⇒ Vedeu::Buffers::Buffer private
- #by_name ⇒ Array|Vedeu::Error::ModelNotFound
- #content_only? ⇒ Boolean private
- #defaults ⇒ Hash<Symbol => Boolean> private
-
#escape?(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether the value is an escape sequence object (e.g. Cells::Escape.).
-
#falsy?(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether the value should be considered false.
-
#hash?(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether the value is a Hash.
-
#initialize(name, options = {}) ⇒ Vedeu::Buffers::Refresh
constructor
Return a new instance of Vedeu::Buffers::Refresh.
-
#line_model? ⇒ Boolean
included
from Common
private
Returns a boolean indicating the model is a Views::Line.
- #name ⇒ String|Symbol private
-
#numeric?(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether the value is a Fixnum.
- #options ⇒ Hash<Symbol => Boolean> private
-
#present?(variable) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether a variable has a useful value.
-
#snake_case(klass) ⇒ String
included
from Common
private
Converts a class name to a lowercase snake case string.
-
#stream_model? ⇒ Boolean
included
from Common
private
Returns a boolean indicating the model is a Views::Stream.
-
#string?(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether the value is a Fixnum.
-
#truthy?(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether the value should be considered true.
-
#view_model? ⇒ Boolean
included
from Common
private
Returns a boolean indicating the model is a Views::View.
Constructor Details
#initialize(name, options = {}) ⇒ Vedeu::Buffers::Refresh
Return a new instance of Vedeu::Buffers::Refresh.
38 39 40 41 |
# File 'lib/vedeu/buffers/refresh.rb', line 38 def initialize(name, = {}) @name = name @options = end |
Class Method Details
.by_name(name = Vedeu.focus) ⇒ Array|Vedeu::Error::ModelNotFound
16 17 18 19 20 |
# File 'lib/vedeu/buffers/refresh.rb', line 16 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
25 26 27 28 29 |
# File 'lib/vedeu/buffers/refresh.rb', line 25 def self.refresh_content_by_name(name = Vedeu.focus) name ||= Vedeu.focus new(name, content_only: true).by_name end |
Instance Method Details
#absent?(variable) ⇒ Boolean Originally defined in module Common
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 a boolean indicating whether a variable is nil or empty.
#become(klass, attributes) ⇒ Class Originally defined in module Common
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.
Converts one class into another.
#boolean(value) ⇒ Boolean Originally defined in module Common
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 a boolean indicating the value was a boolean.
#boolean?(value) ⇒ Boolean Originally defined in module Common
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 a boolean indicating whether the value is a Boolean.
#buffer ⇒ Vedeu::Buffers::Buffer (private)
55 56 57 |
# File 'lib/vedeu/buffers/refresh.rb', line 55 def buffer Vedeu.buffers.by_name(name) end |
#by_name ⇒ Array|Vedeu::Error::ModelNotFound
44 45 46 47 48 49 50 |
# File 'lib/vedeu/buffers/refresh.rb', line 44 def by_name Vedeu.trigger(:_clear_view_content_, name) buffer.render Vedeu.trigger(:_refresh_border_, name) unless content_only? end |
#content_only? ⇒ Boolean (private)
60 61 62 |
# File 'lib/vedeu/buffers/refresh.rb', line 60 def content_only? truthy?([:content_only]) end |
#defaults ⇒ Hash<Symbol => Boolean> (private)
75 76 77 78 79 |
# File 'lib/vedeu/buffers/refresh.rb', line 75 def defaults { content_only: false, } end |
#escape?(value) ⇒ Boolean Originally defined in module Common
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 a boolean indicating whether the value is an escape sequence object (e.g. Vedeu::Cells::Escape.)
#falsy?(value) ⇒ Boolean Originally defined in module Common
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 a boolean indicating whether the value should be considered false.
#hash?(value) ⇒ Boolean Originally defined in module Common
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 a boolean indicating whether the value is a Hash.
#line_model? ⇒ Boolean Originally defined in module Common
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 a boolean indicating the model is a Views::Line.
#name ⇒ String|Symbol (private)
65 66 67 |
# File 'lib/vedeu/buffers/refresh.rb', line 65 def name present?(@name) ? @name : Vedeu.focus end |
#numeric?(value) ⇒ Boolean Originally defined in module Common
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 a boolean indicating whether the value is a Fixnum.
#options ⇒ Hash<Symbol => Boolean> (private)
70 71 72 |
# File 'lib/vedeu/buffers/refresh.rb', line 70 def defaults.merge!(@options) end |
#present?(variable) ⇒ Boolean Originally defined in module Common
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 a boolean indicating whether a variable has a useful value.
#snake_case(klass) ⇒ String Originally defined in module Common
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.
Converts a class name to a lowercase snake case string.
#stream_model? ⇒ Boolean Originally defined in module Common
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 a boolean indicating the model is a Views::Stream.
#string?(value) ⇒ Boolean Originally defined in module Common
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 a boolean indicating whether the value is a Fixnum.
#truthy?(value) ⇒ Boolean Originally defined in module Common
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 a boolean indicating whether the value should be considered true.
#view_model? ⇒ Boolean Originally defined in module Common
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 a boolean indicating the model is a Views::View.