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.
1645 1646 1647 1648 1649 1650 1651 |
# File 'lib/milk_tea/core/types/types.rb', line 1645 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.
1643 1644 1645 |
# File 'lib/milk_tea/core/types/types.rb', line 1643 def fields @fields end |
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
1659 1660 1661 |
# File 'lib/milk_tea/core/types/types.rb', line 1659 def hash @hash end |
#interface_name ⇒ Object (readonly)
Returns the value of attribute interface_name.
1643 1644 1645 |
# File 'lib/milk_tea/core/types/types.rb', line 1643 def interface_name @interface_name end |
#linkage_name ⇒ Object (readonly)
Returns the value of attribute linkage_name.
1643 1644 1645 |
# File 'lib/milk_tea/core/types/types.rb', line 1643 def linkage_name @linkage_name end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
1653 1654 1655 |
# File 'lib/milk_tea/core/types/types.rb', line 1653 def eql?(other) other.is_a?(DynVtable) && other.linkage_name == linkage_name end |
#field(name) ⇒ Object
1665 1666 1667 |
# File 'lib/milk_tea/core/types/types.rb', line 1665 def field(name) @fields[name] end |
#to_s ⇒ Object
1661 1662 1663 |
# File 'lib/milk_tea/core/types/types.rb', line 1661 def to_s linkage_name end |