lib/representable/yaml.rb in representable-2.0.4 vs lib/representable/yaml.rb in representable-2.1.0
- old
+ new
@@ -1,6 +1,6 @@
-require 'representable/bindings/yaml_bindings'
+require 'representable/yaml/binding'
module Representable
module YAML
include Hash
@@ -13,18 +13,18 @@
end
def from_yaml(doc, options={})
hash = Psych.load(doc)
- from_hash(hash, options, PropertyBinding)
+ from_hash(hash, options, Binding)
end
# Returns a Nokogiri::XML object representing this object.
def to_ast(options={})
#root_tag = options[:wrap] || representation_wrap
Psych::Nodes::Mapping.new.tap do |map|
- create_representation_with(map, options, PropertyBinding)
+ create_representation_with(map, options, Binding)
end
end
def to_yaml(*args)
stream = Psych::Nodes::Stream.new