Module: YamlExtension

Defined in:
lib/yaml_extension.rb

Defined Under Namespace

Modules: Assertions

Instance Method Summary collapse

Instance Method Details

#to_yaml(opts = {}) ⇒ Object



48
49
50
51
52
53
54
55
56
# 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