lib/vedeu/models/view/interface.rb in vedeu-0.4.1 vs lib/vedeu/models/view/interface.rb in vedeu-0.4.2

- old
+ new

@@ -1,6 +1,6 @@ -require 'vedeu/support/content_geometry' +require 'vedeu/geometry/content_geometry' require 'vedeu/models/model' require 'vedeu/output/presentation' require 'vedeu/buffers/display_buffer' require 'vedeu/buffers/buffer' @@ -42,12 +42,11 @@ :top, :right, :bottom, :left, :width, - :height, - :origin + :height # Return a new instance of Interface. # # @param attributes [Hash] # @option attributes colour [Vedeu::Colour] @@ -57,20 +56,20 @@ # @option attributes name [String] # @option attributes parent [Vedeu::Composition] # @option attributes style [Vedeu::Style] # @return [Vedeu::Interface] def initialize(attributes = {}) - @attributes = defaults.merge(attributes) + @attributes = defaults.merge!(attributes) - @colour = Colour.coerce(@attributes[:colour]) + @colour = @attributes[:colour] @delay = @attributes[:delay] @group = @attributes[:group] @lines = @attributes[:lines] @name = @attributes[:name] @parent = @attributes[:parent] @repository = Vedeu.interfaces - @style = Style.coerce(@attributes[:style]) + @style = @attributes[:style] end # @param child [] # @return [void] def add(child) @@ -117,16 +116,9 @@ end # @return [Vedeu::Geometry] def geometry Vedeu.geometries.find(name) - end - - # Returns log friendly output. - # - # @return [String] - def inspect - "<#{self.class.name} (lines:#{lines.size})>" end # @return [Vedeu::Lines] def lines collection.coerce(@lines, self)