Class: MilkTea::Types::AttributeHandle
- Defined in:
- lib/milk_tea/core/types/types.rb
Instance Attribute Summary collapse
-
#argument_values ⇒ Object
readonly
Returns the value of attribute argument_values.
-
#attribute_module_name ⇒ Object
readonly
Returns the value of attribute attribute_module_name.
-
#attribute_name ⇒ Object
readonly
Returns the value of attribute attribute_name.
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize(attribute_name, attribute_module_name, target, params, argument_values) ⇒ AttributeHandle
constructor
A new instance of AttributeHandle.
- #to_s ⇒ Object
Methods inherited from Base
#accept, #bitwise?, #boolean?, #children, #field_c_name, #float?, #integer?, #numeric?, #sendable?, #void?
Constructor Details
#initialize(attribute_name, attribute_module_name, target, params, argument_values) ⇒ AttributeHandle
Returns a new instance of AttributeHandle.
327 328 329 330 331 332 333 334 335 |
# File 'lib/milk_tea/core/types/types.rb', line 327 def initialize(attribute_name, attribute_module_name, target, params, argument_values) @attribute_name = attribute_name @attribute_module_name = attribute_module_name @target = target @params = params.freeze @argument_values = argument_values&.freeze @hash = [self.class, attribute_module_name, attribute_name, target].hash freeze end |
Instance Attribute Details
#argument_values ⇒ Object (readonly)
Returns the value of attribute argument_values.
325 326 327 |
# File 'lib/milk_tea/core/types/types.rb', line 325 def argument_values @argument_values end |
#attribute_module_name ⇒ Object (readonly)
Returns the value of attribute attribute_module_name.
325 326 327 |
# File 'lib/milk_tea/core/types/types.rb', line 325 def attribute_module_name @attribute_module_name end |
#attribute_name ⇒ Object (readonly)
Returns the value of attribute attribute_name.
325 326 327 |
# File 'lib/milk_tea/core/types/types.rb', line 325 def attribute_name @attribute_name end |
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
346 347 348 |
# File 'lib/milk_tea/core/types/types.rb', line 346 def hash @hash end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
325 326 327 |
# File 'lib/milk_tea/core/types/types.rb', line 325 def params @params end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
325 326 327 |
# File 'lib/milk_tea/core/types/types.rb', line 325 def target @target end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
337 338 339 340 341 342 |
# File 'lib/milk_tea/core/types/types.rb', line 337 def eql?(other) other.is_a?(AttributeHandle) && other.attribute_name == attribute_name && other.attribute_module_name == attribute_module_name && other.target == target end |
#to_s ⇒ Object
349 350 351 352 |
# File 'lib/milk_tea/core/types/types.rb', line 349 def to_s qualifier = attribute_module_name ? "#{attribute_module_name}." : "" "attribute_of(#{target}, #{qualifier}#{attribute_name})" end |