Class: Steep::TypeInference::BlockParams::Param
- Inherits:
-
Object
- Object
- Steep::TypeInference::BlockParams::Param
- Defined in:
- lib/steep/type_inference/block_params.rb
Instance Attribute Summary collapse
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
-
#var ⇒ Object
readonly
Returns the value of attribute var.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(var:, type:, value:, node:) ⇒ Param
constructor
A new instance of Param.
Constructor Details
#initialize(var:, type:, value:, node:) ⇒ Param
Returns a new instance of Param.
10 11 12 13 14 15 |
# File 'lib/steep/type_inference/block_params.rb', line 10 def initialize(var:, type:, value:, node:) @var = var @type = type @value = value @node = node end |
Instance Attribute Details
#node ⇒ Object (readonly)
Returns the value of attribute node.
8 9 10 |
# File 'lib/steep/type_inference/block_params.rb', line 8 def node @node end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/steep/type_inference/block_params.rb', line 6 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/steep/type_inference/block_params.rb', line 7 def value @value end |
#var ⇒ Object (readonly)
Returns the value of attribute var.
5 6 7 |
# File 'lib/steep/type_inference/block_params.rb', line 5 def var @var end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
17 18 19 |
# File 'lib/steep/type_inference/block_params.rb', line 17 def ==(other) other.is_a?(self.class) && other.var == var && other.type == type && other.value == value && other.node == node end |
#hash ⇒ Object
23 24 25 |
# File 'lib/steep/type_inference/block_params.rb', line 23 def hash self.class.hash ^ var.hash ^ type.hash ^ value.hash ^ node.hash end |