diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-11-17 19:47:29 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-11-17 19:47:29 -0800 |
commit | ccc1107595545a7947080d919529102d3e8c6dfe (patch) | |
tree | d284d0effaa7428fd2ea2c1b76315ff2734c56a2 | |
parent | bffb39d682675904158f43bfafebace0c50ed879 (diff) | |
download | psych-ccc1107595545a7947080d919529102d3e8c6dfe.zip |
renaming YASTBuilder -> YAMLTree
-rw-r--r-- | lib/psych.rb | 2 | ||||
-rw-r--r-- | lib/psych/visitors.rb | 2 | ||||
-rw-r--r-- | lib/psych/visitors/yaml_tree.rb (renamed from lib/psych/visitors/yast_builder.rb) | 2 | ||||
-rw-r--r-- | test/visitors/test_yaml_tree.rb (renamed from test/visitors/test_yast_builder.rb) | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/psych.rb b/lib/psych.rb index df28ba0..74da20a 100644 --- a/lib/psych.rb +++ b/lib/psych.rb @@ -43,7 +43,7 @@ module Psych ### # Dump object +o+ to a YAML string def self.dump o, options = {} - visitor = Psych::Visitors::YASTBuilder.new options + visitor = Psych::Visitors::YAMLTree.new options visitor.accept o visitor.tree.to_yaml end diff --git a/lib/psych/visitors.rb b/lib/psych/visitors.rb index 0708e94..d00dcfd 100644 --- a/lib/psych/visitors.rb +++ b/lib/psych/visitors.rb @@ -1,4 +1,4 @@ require 'psych/visitors/visitor' require 'psych/visitors/to_ruby' require 'psych/visitors/emitter' -require 'psych/visitors/yast_builder' +require 'psych/visitors/yaml_tree' diff --git a/lib/psych/visitors/yast_builder.rb b/lib/psych/visitors/yaml_tree.rb index 4eb21fd..0f0e3ba 100644 --- a/lib/psych/visitors/yast_builder.rb +++ b/lib/psych/visitors/yaml_tree.rb @@ -1,6 +1,6 @@ module Psych module Visitors - class YASTBuilder < Psych::Visitors::Visitor + class YAMLTree < Psych::Visitors::Visitor attr_reader :tree def initialize options = {} diff --git a/test/visitors/test_yast_builder.rb b/test/visitors/test_yaml_tree.rb index 8645a4d..5570204 100644 --- a/test/visitors/test_yast_builder.rb +++ b/test/visitors/test_yaml_tree.rb @@ -3,9 +3,9 @@ require 'psych' module Psych module Visitors - class TestYASTBuilder < MiniTest::Unit::TestCase + class TestYAMLTree < MiniTest::Unit::TestCase def setup - @v = Visitors::YASTBuilder.new + @v = Visitors::YAMLTree.new end def test_object_has_no_class @@ -154,7 +154,7 @@ module Psych end def assert_round_trip obj - v = Visitors::YASTBuilder.new + v = Visitors::YAMLTree.new v.accept(obj) assert_equal(obj, Psych.load(v.tree.to_yaml)) assert_equal(obj, Psych.load(obj.to_yaml)) |