Class: Lycra::Types::Nested

Inherits:
Type
  • Object
show all
Defined in:
lib/lycra/types.rb

Instance Attribute Summary

Attributes inherited from Type

#value

Class Method Summary collapse

Methods inherited from Type

#initialize, klasses, to_s, transform, #transform, type, #type, #valid?

Constructor Details

This class inherits a constructor from Lycra::Types::Type

Class Method Details

.valid?(value, required = false, nested = false) ⇒ Boolean

Returns:



128
129
130
131
# File 'lib/lycra/types.rb', line 128

def self.valid?(value, required=false, nested=false)
  return true if value.nil?
  value.respond_to?(:each)
end