Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/structish_object_extensions.rb

Direct Known Subclasses

Structish::Hash

Instance Method Summary collapse

Instance Method Details

#to_structish(structish_klass) ⇒ Object

Raises:

  • (ArgumentError)


2
3
4
5
# File 'lib/structish_object_extensions.rb', line 2

def to_structish(structish_klass)
  raise(ArgumentError, "Class is not a child of Structish::Hash") unless structish_klass < Structish::Hash
  structish_klass.new(self)
end