Class: Steep::TypeInference::MethodParams::BaseRestParameter
- Defined in:
- lib/steep/type_inference/method_params.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(name:, type:, node:) ⇒ BaseRestParameter
constructor
A new instance of BaseRestParameter.
Constructor Details
#initialize(name:, type:, node:) ⇒ BaseRestParameter
Returns a new instance of BaseRestParameter.
62 63 64 65 66 |
# File 'lib/steep/type_inference/method_params.rb', line 62 def initialize(name:, type:, node:) @name = name @type = type @node = node end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
58 59 60 |
# File 'lib/steep/type_inference/method_params.rb', line 58 def name @name end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
60 61 62 |
# File 'lib/steep/type_inference/method_params.rb', line 60 def node @node end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
59 60 61 |
# File 'lib/steep/type_inference/method_params.rb', line 59 def type @type end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
68 69 70 71 72 73 |
# File 'lib/steep/type_inference/method_params.rb', line 68 def ==(other) other.class == self.class && other.name == name && other.type == type && other.node == node end |
#hash ⇒ Object
77 78 79 |
# File 'lib/steep/type_inference/method_params.rb', line 77 def hash self.class.hash ^ name.hash ^ type.hash ^ node.hash end |