Class: Vedeu::View

Inherits:
Object
  • Object
show all
Includes:
API
Defined in:
lib/vedeu/output/view.rb

Constant Summary

Constants included from API

API::InterfaceNotSpecified, API::OutOfRange

Class Method Summary collapse

Instance Method Summary collapse

Methods included from API

#event, #events, #interface, #log, #trigger, #use, #view

Constructor Details

#initialize(object = nil) ⇒ View



11
12
13
# File 'lib/vedeu/output/view.rb', line 11

def initialize(object = nil)
  @object = object
end

Class Method Details

.render(object = nil) ⇒ Object



7
8
9
# File 'lib/vedeu/output/view.rb', line 7

def self.render(object = nil)
  new(object).render
end

Instance Method Details

#outputObject



21
22
23
# File 'lib/vedeu/output/view.rb', line 21

def output
  fail NotImplemented, 'Implement #output on your subclass of Vedeu::View.'
end

#renderObject



15
16
17
18
19
# File 'lib/vedeu/output/view.rb', line 15

def render
  composition.interfaces.map do |interface|
    Buffers.enqueue(interface.name, interface.to_s)
  end
end