Class: Steep::LocatedValue
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(value:, location:) ⇒ LocatedValue
constructor
A new instance of LocatedValue.
Constructor Details
#initialize(value:, location:) ⇒ LocatedValue
Returns a new instance of LocatedValue.
5 6 7 8 |
# File 'lib/steep/located_value.rb', line 5 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
3 4 5 |
# File 'lib/steep/located_value.rb', line 3 def location @location end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
3 4 5 |
# File 'lib/steep/located_value.rb', line 3 def value @value end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
10 11 12 |
# File 'lib/steep/located_value.rb', line 10 def ==(other) other.is_a?(LocatedValue) && other.value == value end |
#hash ⇒ Object
16 17 18 |
# File 'lib/steep/located_value.rb', line 16 def hash value.hash # steep:ignore NoMethod end |