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



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

alias __to_yaml__ to_yaml

#to_yaml(opts = {}) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/dfect.rb', line 15

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