Class: Types::Type Abstract
Overview
This class is abstract.
Type defining class.
Direct Known Subclasses
Instance Method Summary collapse
-
#match_type?(object) ⇒ Boolean
Matches object is of this type.
-
#type_classes ⇒ Array
abstract
Returns classes which are part of this type.
-
#type_types ⇒ Array
Returns types which are part of this type.
Instance Method Details
#match_type?(object) ⇒ Boolean
Matches object is of this type.
@param [Object] object object for type matching
46 47 48 49 50 51 52 53 |
# File 'lib/types.rb', line 46 def match_type?(object) result = object.kind_of_any? self.type_classes if not result result = object.type_of_any? self.type_types end return result end |
#type_classes ⇒ Array
This method is abstract.
Returns classes which are part of this type.
26 27 28 |
# File 'lib/types.rb', line 26 def type_classes raise Exception::new("Class is abstract.") end |
#type_types ⇒ Array
Returns types which are part of this type.
35 36 37 |
# File 'lib/types.rb', line 35 def type_types [ ] end |