Class: Vedeu::View
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
private
Returns the value of attribute object.
Class Method Summary collapse
Instance Method Summary collapse
-
#attributes ⇒ Object
private
private
[].
- #composition ⇒ Composition private private
- #enqueue ⇒ Array
- #initialize(object = nil) ⇒ View constructor
- #interfaces ⇒ Array private private
- #render ⇒ Exception (also: #output)
Methods included from API
#event, #events, #height, #interface, #keypress, #log, #resize, #shutdown, #trigger, #unevent, #use, #view, #views, #width
Constructor Details
#initialize(object = nil) ⇒ View
14 15 16 |
# File 'lib/vedeu/support/view.rb', line 14 def initialize(object = nil) @object = object end |
Instance Attribute Details
#object ⇒ Object (readonly, private)
Returns the value of attribute object.
31 32 33 |
# File 'lib/vedeu/support/view.rb', line 31 def object @object end |
Class Method Details
.render(object = nil) ⇒ Array
8 9 10 |
# File 'lib/vedeu/support/view.rb', line 8 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.
Returns [].
47 48 49 |
# File 'lib/vedeu/support/view.rb', line 47 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.
41 42 43 |
# File 'lib/vedeu/support/view.rb', line 41 def composition @_composition ||= Composition.new(attributes) end |
#enqueue ⇒ Array
19 20 21 |
# File 'lib/vedeu/support/view.rb', line 19 def enqueue interfaces.map { |interface| Buffers.enqueue(interface.name, interface) } end |
#interfaces ⇒ Array (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.
35 36 37 |
# File 'lib/vedeu/support/view.rb', line 35 def interfaces composition.interfaces end |
#render ⇒ Exception Also known as: output
24 25 26 |
# File 'lib/vedeu/support/view.rb', line 24 def render fail NotImplemented, 'Implement #render on your subclass of Vedeu::View.' end |