lib/vedeu/repository/interface.rb in vedeu-0.0.19 vs lib/vedeu/repository/interface.rb in vedeu-0.0.20
- old
+ new
@@ -20,18 +20,20 @@
end
def create
InterfaceRepository.create(self)
- Compositor.arrange(initial_state)
-
self
end
def update
if enqueued?
@current = dequeue
+ elsif @current.empty?
+ Compositor.arrange(initial_state)
+
+ @current = dequeue
else
@current
end
end
@@ -48,11 +50,11 @@
end
private
def initial_state
- { name => [Array.new(geometry.height) { '' }] }
+ { name => Array.new(geometry.height) { [""] } }
end
def foreground
attributes[:fg] || attributes[:foreground]
end
@@ -60,10 +62,11 @@
def background
attributes[:bg] || attributes[:background]
end
end
+ # :nocov:
module ClassMethods
def interface(name, options = {})
interface_name = name.is_a?(Symbol) ? name.to_s : name
Interface.create({ name: interface_name }.merge!(options))
@@ -71,6 +74,7 @@
end
def self.included(receiver)
receiver.extend(ClassMethods)
end
+ # :nocov:
end