lib/representable/yaml.rb in representable-1.8.5 vs lib/representable/yaml.rb in representable-2.0.0.rc1

- old
+ new

@@ -5,30 +5,11 @@ include Hash def self.included(base) base.class_eval do include Representable - extend ClassMethods #self.representation_wrap = true # let representable compute it. - end - end - - - module ClassMethods - # Creates a new Ruby object from XML using mapping information declared in the class. - # - # Accepts a block yielding the currently iterated Definition. If the block returns false - # the property is skipped. - # - # Example: - # band.from_xml("<band><name>Nofx</name></band>") - def from_yaml(*args, &block) - create_represented(*args, &block).from_yaml(*args) - end - - private - def representer_engine - Representable::YAML + register_feature Representable::YAML end end def from_yaml(doc, options={})