diff options
| -rw-r--r-- | lib/blink/statechange.rb | 2 | ||||
| -rw-r--r-- | lib/blink/type.rb | 24 | ||||
| -rw-r--r-- | lib/blink/type/state.rb | 6 |
3 files changed, 16 insertions, 16 deletions
diff --git a/lib/blink/statechange.rb b/lib/blink/statechange.rb index a9177a7bd..10f53be9d 100644 --- a/lib/blink/statechange.rb +++ b/lib/blink/statechange.rb @@ -32,7 +32,7 @@ module Blink #--------------------------------------------------------------- def to_s - puts "%s: %s => %s" % [@path,@is,@should] + return "%s: %s => %s" % [@path,@is,@should] end #--------------------------------------------------------------- end diff --git a/lib/blink/type.rb b/lib/blink/type.rb index 2c9eae5b4..d5b78583a 100644 --- a/lib/blink/type.rb +++ b/lib/blink/type.rb @@ -466,24 +466,24 @@ module Blink #--------------------------------------------------------------- def evaluate - self.retrieve - unless self.insync? - if self.noop - Blink.verbose("%s is noop" % self) - else - self.each { |state| - #Blink.notice("getting state change on %s" % state) - statechange = Blink::StateChange.new(state) - puts statechange - } + self.each { |state| + state.retrieve + unless state.insync? + change = Blink::StateChange.new(state) + + if self.noop + Blink.verbose("NOOP: %s" % change.to_s) + else + # what? + end end #if @performoperation == :sync # self.sync #else # # we, uh, don't do anything #end - end - self.retrieve + state.retrieve + } end #--------------------------------------------------------------- diff --git a/lib/blink/type/state.rb b/lib/blink/type/state.rb index 4e17e4124..c8629f80d 100644 --- a/lib/blink/type/state.rb +++ b/lib/blink/type/state.rb @@ -107,11 +107,11 @@ module Blink end def retrieve - true + return true end def insync? - true + return true end def should=(value) @@ -120,7 +120,7 @@ module Blink end def sync - true + return true end def is=(value) |
