Class: RubyBreaker::TypeDefs::OrType

Inherits:
Type
  • Object
show all
Defined in:
lib/rubybreaker/type/type.rb

Overview

This class represents one of many types

Instance Attribute Summary collapse

Attributes inherited from Type

#ctx

Instance Method Summary collapse

Methods inherited from Type

#eql?, #subtype_of?, #unparse

Constructor Details

#initialize(types = [], *args) ⇒ OrType

Returns a new instance of OrType.



217
218
219
220
# File 'lib/rubybreaker/type/type.rb', line 217

def initialize(types=[],*args)
  super(*args)
  @types = types
end

Instance Attribute Details

#typesObject

This accessor sets/gets the inner types of this “or” type.



215
216
217
# File 'lib/rubybreaker/type/type.rb', line 215

def types
  @types
end