Class: Array

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

Direct Known Subclasses

Structish::Array

Instance Method Summary collapse

Instance Method Details

#to_structish(structish_klass) ⇒ Object

Raises:

  • (ArgumentError)


9
10
11
12
# File 'lib/structish_object_extensions.rb', line 9

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