Class: Orbacle::GenericType
- Inherits:
-
Object
- Object
- Orbacle::GenericType
- Defined in:
- lib/orbacle/generic_type.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #bottom? ⇒ Boolean
- #each_possible_type {|_self| ... } ⇒ Object
- #hash ⇒ Object
-
#initialize(name, parameters) ⇒ GenericType
constructor
A new instance of GenericType.
Constructor Details
#initialize(name, parameters) ⇒ GenericType
Returns a new instance of GenericType.
5 6 7 8 |
# File 'lib/orbacle/generic_type.rb', line 5 def initialize(name, parameters) @name = name @parameters = parameters end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/orbacle/generic_type.rb', line 10 def name @name end |
#parameters ⇒ Object (readonly)
Returns the value of attribute parameters.
10 11 12 |
# File 'lib/orbacle/generic_type.rb', line 10 def parameters @parameters end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
12 13 14 15 16 |
# File 'lib/orbacle/generic_type.rb', line 12 def ==(other) self.class == other.class && self.name == other.name && self.parameters == other.parameters end |
#bottom? ⇒ Boolean
31 32 33 |
# File 'lib/orbacle/generic_type.rb', line 31 def bottom? false end |
#each_possible_type {|_self| ... } ⇒ Object
27 28 29 |
# File 'lib/orbacle/generic_type.rb', line 27 def each_possible_type yield self end |
#hash ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/orbacle/generic_type.rb', line 18 def hash [ self.class, self.name, self.parameters, ].hash ^ BIG_VALUE end |