Class: Steep::Services::ContentChange::Position
- Defined in:
- lib/steep/services/content_change.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(line:, column:) ⇒ Position
constructor
A new instance of Position.
Constructor Details
#initialize(line:, column:) ⇒ Position
Returns a new instance of Position.
7 8 9 10 |
# File 'lib/steep/services/content_change.rb', line 7 def initialize(line:, column:) @line = line @column = column end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
5 6 7 |
# File 'lib/steep/services/content_change.rb', line 5 def column @column end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
5 6 7 |
# File 'lib/steep/services/content_change.rb', line 5 def line @line end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
12 13 14 |
# File 'lib/steep/services/content_change.rb', line 12 def ==(other) other.is_a?(Position) && other.line == line && other.column == column end |
#hash ⇒ Object
18 19 20 |
# File 'lib/steep/services/content_change.rb', line 18 def hash self.class.hash ^ line ^ column end |