Class: Object

Inherits:
BasicObject
Defined in:
lib/omu_support/core_ext/object.rb

Instance Method Summary collapse

Instance Method Details

#must_be_any_of!(*type_specifications) ⇒ Object



87
88
89
# File 'lib/omu_support/core_ext/object.rb', line 87

def must_be_any_of!(*type_specifications)
  Type_.must_be_any_of(self, *type_specifications)
end

#to_yaml_prettyObject



4
5
6
7
8
9
10
# File 'lib/omu_support/core_ext/object.rb', line 4

def to_yaml_pretty
  yaml = to_yaml line_width: -1
  yaml.gsub!(/\s+$/, '')
  yaml.gsub!("\n-", "\n\n-")
  yaml.gsub!(/^( +)-/, '\\1  -')
  yaml << "\n"
end