lib/representable/yaml.rb in representable-3.0.4 vs lib/representable/yaml.rb in representable-3.1.0
- old
+ new
@@ -1,11 +1,11 @@
require 'psych'
-require 'representable/hash'
-require 'representable/yaml/binding'
+require 'representable'
module Representable
module YAML
+ autoload :Binding, 'representable/yaml/binding'
include Hash
def self.included(base)
base.class_eval do
include Representable
@@ -38,9 +38,9 @@
doc.children << to_ast(*args)
stream.to_yaml
end
- alias_method :render, :to_yaml
+ alias_method :render, :to_yaml
alias_method :parse, :from_yaml
end
end