Class: Vedeu::Buffers::RefreshContent
- Inherits:
-
Object
- Object
- Vedeu::Buffers::RefreshContent
- Includes:
- Common
- Defined in:
- lib/vedeu/buffers/refresh_content.rb
Overview
Refreshes only the content of the given named interface.
Instance Attribute Summary collapse
-
#name ⇒ NilClass|Symbol|String
readonly
protected
The name of the model, the target model or the name of the associated model.
Class Method Summary collapse
Instance Method Summary collapse
- #buffer ⇒ Vedeu::Buffers::Buffer private
- #by_name ⇒ Array|Vedeu::Error::ModelNotFound
-
#initialize(name = Vedeu.focus) ⇒ Vedeu::Buffers::RefreshContent
constructor
Return a new instance of Vedeu::Buffers::RefreshContent.
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 = Vedeu.focus) ⇒ Vedeu::Buffers::RefreshContent
Return a new instance of Vedeu::Buffers::RefreshContent.
24 25 26 |
# File 'lib/vedeu/buffers/refresh_content.rb', line 24 def initialize(name = Vedeu.focus) @name = name || Vedeu.focus end |
Instance Attribute Details
#name ⇒ NilClass|Symbol|String (readonly, protected)
Returns The name of the model, the target model or the name of the associated model.
39 40 41 |
# File 'lib/vedeu/buffers/refresh_content.rb', line 39 def name @name end |
Class Method Details
.by_name(name = Vedeu.focus) ⇒ Array|Vedeu::Error::ModelNotFound
16 17 18 |
# File 'lib/vedeu/buffers/refresh_content.rb', line 16 def self.by_name(name = Vedeu.focus) new(name).by_name end |
Instance Method Details
#buffer ⇒ Vedeu::Buffers::Buffer (private)
44 45 46 |
# File 'lib/vedeu/buffers/refresh_content.rb', line 44 def buffer Vedeu.buffers.by_name(name) end |
#by_name ⇒ Array|Vedeu::Error::ModelNotFound
29 30 31 32 33 |
# File 'lib/vedeu/buffers/refresh_content.rb', line 29 def by_name Vedeu.clear_content_by_name(name) buffer.render end |