lib/vedeu/repository/interface.rb in vedeu-0.0.20 vs lib/vedeu/repository/interface.rb in vedeu-0.0.21

- old
+ new

@@ -1,21 +1,19 @@ module Vedeu class Interface include Queue - attr_accessor :id, :attributes, :active, :name, :cursor, :current + attr_accessor :attributes, :name, :cursor, :current class << self def create(attributes = {}) new(attributes).create end end def initialize(attributes = {}) @attributes = attributes || {} - - @active = false @name = attributes[:name] @cursor = attributes.fetch(:cursor, true) @current = [] end @@ -23,10 +21,10 @@ InterfaceRepository.create(self) self end - def update + def refresh if enqueued? @current = dequeue elsif @current.empty? Compositor.arrange(initial_state)