Class: Vedeu::Views::Composition Private
- Inherits:
-
Object
- Object
- Vedeu::Views::Composition
- Includes:
- Presentation, Presentation::Colour, Presentation::Position, Presentation::Styles, Repositories::Model, Value
- Defined in:
- lib/vedeu/views/composition.rb
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.
A composition is a collection of interfaces.
Instance Attribute Summary
Attributes included from Repositories::Model
Instance Method Summary collapse
- #attributes ⇒ Hash<Symbol => void> private
-
#defaults ⇒ Hash<Symbol => void>
private
private
The default options/attributes for a new instance of this class.
-
#initialize(attributes = {}) ⇒ Vedeu::Views::Composition
constructor
private
Returns a new instance of Vedeu::Views::Composition.
- #update_buffers(refresh = false) ⇒ Vedeu::Views::Composition private
Methods included from Value
Methods included from Presentation::Styles
#render_style, #style, #style=, #style?
Methods included from Presentation::Parent
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?
Methods included from Presentation::Position
#position, #position=, #position?, #render_position, #x, #y
Methods included from Presentation::Colour
#background, #background=, #colour, #colour=, #colour?, #foreground, #foreground=, #interface, #named_colour, #named_colour?, #parent_colour, #parent_colour?, #render_colour
Methods included from Presentation
Methods included from Repositories::Model
Constructor Details
#initialize(attributes = {}) ⇒ Vedeu::Views::Composition
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 Vedeu::Views::Composition.
40 41 42 43 44 |
# File 'lib/vedeu/views/composition.rb', line 40 def initialize(attributes = {}) defaults.merge!(attributes).each do |key, value| instance_variable_set("@#{key}", value) end end |
Instance Method Details
#attributes ⇒ Hash<Symbol => void>
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.
47 48 49 50 51 52 53 54 55 |
# File 'lib/vedeu/views/composition.rb', line 47 def attributes { client: client, colour: colour, parent: parent, style: style, value: value, } end |
#defaults ⇒ Hash<Symbol => void> (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.
The default options/attributes for a new instance of this class.
70 71 72 73 74 75 76 77 78 |
# File 'lib/vedeu/views/composition.rb', line 70 def defaults { client: nil, colour: nil, parent: nil, style: nil, value: [], } end |
#update_buffers(refresh = false) ⇒ Vedeu::Views::Composition
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.
61 62 63 64 65 |
# File 'lib/vedeu/views/composition.rb', line 61 def update_buffers(refresh = false) views.each { |view| view.update_buffer(refresh) } if views? self end |