Class: Vedeu::View Deprecated Private
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.
May disappear in 0.3.0. Prefer API#render instead.
Subclassing Vedeu::View will allow Vedeu to call your #render method. This method should contain attributes required to build a view or views. These attributes will be added to the back buffer of each interface mentioned, to be rendered upon next refresh.
Instance Attribute Summary collapse
- #object ⇒ Object readonly private private
Class Method Summary collapse
- .render(object = nil) ⇒ Array private
Instance Method Summary collapse
-
#attributes ⇒ Object
private
private
Calls the #render method of the subclass, hopefully receives attributes suitable to create one or more views.
-
#composition ⇒ Composition
private
private
Create a new Composition object with the attributes.
- #enqueue ⇒ Array private
-
#initialize(object = nil) ⇒ View
constructor
private
Returns a new instance of View.
- #render ⇒ Exception private
Methods included from API
#configure, #defined, #event, #focus, #height, #interface, #keypress, #keys, #log, #menu, #resize, #trigger, #unevent, #use, #view, #views, #width
Constructor Details
#initialize(object = nil) ⇒ View
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 new instance of View.
25 26 27 |
# File 'lib/vedeu/output/view.rb', line 25 def initialize(object = nil) @object = object end |
Instance Attribute Details
#object ⇒ Object (readonly, 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.
45 46 47 |
# File 'lib/vedeu/output/view.rb', line 45 def object @object end |
Class Method Details
.render(object = nil) ⇒ Array
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.
17 18 19 |
# File 'lib/vedeu/output/view.rb', line 17 def self.render(object = nil) new(object).enqueue end |
Instance Method Details
#attributes ⇒ Object (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.
Calls the #render method of the subclass, hopefully receives attributes suitable to create one or more views.
60 61 62 |
# File 'lib/vedeu/output/view.rb', line 60 def attributes render end |
#composition ⇒ Composition (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.
Create a new Composition object with the attributes.
51 52 53 |
# File 'lib/vedeu/output/view.rb', line 51 def composition @_composition ||= Composition.new(attributes) end |
#enqueue ⇒ Array
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.
30 31 32 33 34 |
# File 'lib/vedeu/output/view.rb', line 30 def enqueue composition.interfaces.map do |interface| Buffers.add(interface.attributes) end end |
#render ⇒ Exception
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/output/view.rb', line 39 def render fail NotImplemented, 'Implement #render on your subclass of Vedeu::View.' end |