Class: NRSER::Types::Union

Inherits:
Combinator show all
Defined in:
lib/nrser/types/combinators.rb

Instance Attribute Summary

Attributes inherited from Combinator

#types

Instance Method Summary collapse

Methods inherited from Combinator

#==, #default_name, #from_s, #has_from_s?, #has_to_data?, #initialize, #to_data

Methods inherited from Type

#check, #default_name, #from_data, #from_s, #has_from_data?, #has_from_s?, #has_to_data?, #initialize, #name, #respond_to?, short_name, #to_data, #to_s

Constructor Details

This class inherits a constructor from NRSER::Types::Combinator

Instance Method Details

#test(value) ⇒ Object



104
105
106
# File 'lib/nrser/types/combinators.rb', line 104

def test value
  @types.any? {|type| type.test value}
end