Module YamlExtension
In: lib/yaml_extension.rb

Methods

to_yaml   to_yaml  

Classes and Modules

Module YamlExtension::Assertions

Public Instance methods

[Source]

# File lib/yaml_extension.rb, line 48
    def to_yaml ( opts={} )
      if respond_to? :to_yaml_string
        YAML::quick_emit(object_id, opts) do |out|
          out.scalar(taguri, to_yaml_string, :plain)
        end
      else
        send(old_to_yaml, opts)
      end
    end

[Source]

# File lib/yaml_extension.rb, line 58
    def to_yaml ( opts={} )
      if respond_to? :to_yaml_string
        YAML::quick_emit(self.object_id, opts) do |out|
          out << "#{to_yaml_type} #{to_yaml_string}"
        end
      else
        send(old_to_yaml, opts)
      end
    end

[Validate]