Class: ObjectFlatten
- Inherits:
-
Object
- Object
- ObjectFlatten
- Defined in:
- lib/object_flatten.rb,
lib/object_flatten/version.rb,
lib/object_flatten/object_flatten.rb
Constant Summary collapse
- VERSION =
'0.1.1'
Class Method Summary collapse
Class Method Details
.flatten(obj, options = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/object_flatten/object_flatten.rb', line 3 def flatten(obj, = {}) unless obj.is_a?(Hash) raise TypeError, "TypeError: wrong argument type #{obj.class} (expected Hash)" end = { :separator => '.', }.merge() flatten0(nil, obj, ) end |