Module: Representable::YAML::ClassMethods

Defined in:
lib/representable/yaml.rb

Instance Method Summary collapse

Instance Method Details

#from_yaml(*args, &block) ⇒ Object

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>")


25
26
27
# File 'lib/representable/yaml.rb', line 25

def from_yaml(*args, &block)
  create_represented(*args, &block).from_yaml(*args)
end