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