lib/dagger/generator.rb in ruby-dagger-0.1.0 vs lib/dagger/generator.rb in ruby-dagger-0.1.1

- old
+ new

@@ -6,16 +6,19 @@ # helper methods to concrete subclasses. # # +Context+ key access: # :call-seq: # dictionary => Hash-like with current key lookup dictionary. - # rule_chain => Hash of remaining rules in the current chain. # # +Context+ value update: # :call-seq: # update(key: value, ...) # + # Stop the processing of current rule chain: + # :call-seq: + # stop + # # Wrap non-enumerable objects in an +Array+ # :call-seq: # enumerable(value) => value || [value] # # Concrete subclasses must implement: @@ -35,10 +38,20 @@ @context = context end private - delegate %i[dictionary rule_chain] => :@context + delegate %i[dictionary] => :@context + + # Stop processing the current rule chain + # + # :call-seq: + # stop + # + # Raises +StopIteration+ + def stop + raise StopIteration + end # Update context attributes with new values # # :call-seq: # update(key: value, ...)