Class: Class

Inherits:
Object show all
Defined in:
lib/dfect.rb

Overview

Work around this by representing a class by its name.

Instance Method Summary collapse

Instance Method Details

#__to_yaml__Object

:nodoc: all



15
# File 'lib/dfect.rb', line 15

alias __to_yaml__ to_yaml

#to_yaml(opts = {}) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/dfect.rb', line 18

def to_yaml opts = {}
  begin
    __to_yaml__
  rescue TypeError => e
    warn e
    self.name.to_yaml opts
  end
end