Class: MilkTea::Types::DynVtable
- Defined in:
- lib/milk_tea/core/types/types.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#interface_name ⇒ Object
readonly
Returns the value of attribute interface_name.
-
#linkage_name ⇒ Object
readonly
Returns the value of attribute linkage_name.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #field(name) ⇒ Object
-
#initialize(interface_name, fields = {}) ⇒ DynVtable
constructor
A new instance of DynVtable.
- #to_s ⇒ Object
Methods inherited from Base
#accept, #bitwise?, #boolean?, #children, #field_c_name, #float?, #integer?, #numeric?, #sendable?, #void?
Constructor Details
#initialize(interface_name, fields = {}) ⇒ DynVtable
Returns a new instance of DynVtable.
1687 1688 1689 1690 1691 1692 1693 |
# File 'lib/milk_tea/core/types/types.rb', line 1687 def initialize(interface_name, fields = {}) @interface_name = interface_name @linkage_name = "mt_vtable_#{interface_name}" @fields = fields @hash = [self.class, @linkage_name].hash freeze end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
1685 1686 1687 |
# File 'lib/milk_tea/core/types/types.rb', line 1685 def fields @fields end |
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
1701 1702 1703 |
# File 'lib/milk_tea/core/types/types.rb', line 1701 def hash @hash end |
#interface_name ⇒ Object (readonly)
Returns the value of attribute interface_name.
1685 1686 1687 |
# File 'lib/milk_tea/core/types/types.rb', line 1685 def interface_name @interface_name end |
#linkage_name ⇒ Object (readonly)
Returns the value of attribute linkage_name.
1685 1686 1687 |
# File 'lib/milk_tea/core/types/types.rb', line 1685 def linkage_name @linkage_name end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
1695 1696 1697 |
# File 'lib/milk_tea/core/types/types.rb', line 1695 def eql?(other) other.is_a?(DynVtable) && other.linkage_name == linkage_name end |
#field(name) ⇒ Object
1707 1708 1709 |
# File 'lib/milk_tea/core/types/types.rb', line 1707 def field(name) @fields[name] end |
#to_s ⇒ Object
1703 1704 1705 |
# File 'lib/milk_tea/core/types/types.rb', line 1703 def to_s linkage_name end |