summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych/visitors/visitor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/psych/lib/psych/visitors/visitor.rb')
-rw-r--r--ext/psych/lib/psych/visitors/visitor.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/psych/lib/psych/visitors/visitor.rb b/ext/psych/lib/psych/visitors/visitor.rb
index ccd8c3bd55..3471c43dfa 100644
--- a/ext/psych/lib/psych/visitors/visitor.rb
+++ b/ext/psych/lib/psych/visitors/visitor.rb
@@ -1,6 +1,15 @@
module Psych
module Visitors
class Visitor
+ attr_reader :started, :finished
+ alias :finished? :finished
+ alias :started? :started
+
+ def initialize
+ @started = false
+ @finished = false
+ end
+
def accept target
case target
when Psych::Nodes::Scalar then visit_Psych_Nodes_Scalar target