Class: Mirrors::Marker
- Inherits:
-
Object
- Object
- Mirrors::Marker
- Defined in:
- lib/mirrors/index/marker.rb
Constant Summary collapse
- TYPE_TASK =
'mirrors.marker.task'.freeze
- TYPE_PROBLEM =
'mirrors.marker.problem'.freeze
- TYPE_TEXT =
'mirrors.marker.text'.freeze
- TYPE_CLASS_REFERENCE =
'mirrors.marker.text.class_reference'.freeze
- TYPE_METHOD_REFERENCE =
'mirrors.marker.text.method_reference'.freeze
- TYPE_FIELD_REFERENCE =
'mirrors.marker.text.field_reference'.freeze
- NO_LINE =
-1
- NO_COLUMN =
-1
Instance Attribute Summary collapse
-
#end_column ⇒ Object
readonly
Returns the value of attribute end_column.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#start_column ⇒ Object
readonly
Returns the value of attribute start_column.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
- #hashy ⇒ Object
-
#initialize(type: TYPE_TASK, message: '', file: nil, line: NO_LINE, start_column: NO_COLUMN, end_column: NO_COLUMN) ⇒ Marker
constructor
A new instance of Marker.
Constructor Details
#initialize(type: TYPE_TASK, message: '', file: nil, line: NO_LINE, start_column: NO_COLUMN, end_column: NO_COLUMN) ⇒ Marker
Returns a new instance of Marker.
15 16 17 18 19 20 21 22 |
# File 'lib/mirrors/index/marker.rb', line 15 def initialize(type: TYPE_TASK, message: '', file: nil, line: NO_LINE, start_column: NO_COLUMN, end_column: NO_COLUMN) @type = type = @file = file @line = line @start_column = start_column @end_column = end_column end |
Instance Attribute Details
#end_column ⇒ Object (readonly)
Returns the value of attribute end_column.
13 14 15 |
# File 'lib/mirrors/index/marker.rb', line 13 def end_column @end_column end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
13 14 15 |
# File 'lib/mirrors/index/marker.rb', line 13 def file @file end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
13 14 15 |
# File 'lib/mirrors/index/marker.rb', line 13 def line @line end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
13 14 15 |
# File 'lib/mirrors/index/marker.rb', line 13 def end |
#start_column ⇒ Object (readonly)
Returns the value of attribute start_column.
13 14 15 |
# File 'lib/mirrors/index/marker.rb', line 13 def start_column @start_column end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
13 14 15 |
# File 'lib/mirrors/index/marker.rb', line 13 def type @type end |
Instance Method Details
#==(other) ⇒ Object
24 25 26 |
# File 'lib/mirrors/index/marker.rb', line 24 def ==(other) type == other.type && == other. && line == other.line && start_column == other.start_column && end_column == other.end_column end |
#eql?(other) ⇒ Boolean
28 29 30 |
# File 'lib/mirrors/index/marker.rb', line 28 def eql?(other) self == other end |
#hash ⇒ Object
32 33 34 |
# File 'lib/mirrors/index/marker.rb', line 32 def hash [@type, , @line, @start_column, @end_column].hash end |
#hashy ⇒ Object
36 37 38 |
# File 'lib/mirrors/index/marker.rb', line 36 def hashy [@type, , @line, @start_column, @end_column] end |