lib/vedeu/cursor/cursor.rb in vedeu-0.4.39 vs lib/vedeu/cursor/cursor.rb in vedeu-0.4.40

- old
+ new

@@ -59,16 +59,10 @@ # name. attributes = { name: attributes } if attributes.is_a?(String) @attributes = defaults.merge!(attributes) - @name = @attributes.fetch(:name) - @ox = @attributes.fetch(:ox) - @oy = @attributes.fetch(:oy) - @repository = @attributes.fetch(:repository) - @visible = @attributes.fetch(:visible) - @x = @attributes.fetch(:x) - @y = @attributes.fetch(:y) + @attributes.each { |key, value| instance_variable_set("@#{key}", value) } @position = Vedeu::Position.new(@y, @x) end # @return [String]