Class: RBI::Loc
- Inherits:
-
Object
- Object
- RBI::Loc
- Extended by:
- T::Sig
- Defined in:
- lib/rbi/loc.rb,
lib/rbi/parser.rb
Instance Attribute Summary collapse
-
#begin_column ⇒ Object
readonly
Returns the value of attribute begin_column.
-
#begin_line ⇒ Object
readonly
Returns the value of attribute begin_line.
-
#end_column ⇒ Object
readonly
Returns the value of attribute end_column.
-
#end_line ⇒ Object
readonly
Returns the value of attribute end_line.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file: nil, begin_line: nil, end_line: nil, begin_column: nil, end_column: nil) ⇒ Loc
constructor
A new instance of Loc.
- #to_s ⇒ Object
Constructor Details
#initialize(file: nil, begin_line: nil, end_line: nil, begin_column: nil, end_column: nil) ⇒ Loc
Returns a new instance of Loc.
23 24 25 26 27 28 29 |
# File 'lib/rbi/loc.rb', line 23 def initialize(file: nil, begin_line: nil, end_line: nil, begin_column: nil, end_column: nil) @file = file @begin_line = begin_line @end_line = end_line @begin_column = begin_column @end_column = end_column end |
Instance Attribute Details
#begin_column ⇒ Object (readonly)
Returns the value of attribute begin_column.
12 13 14 |
# File 'lib/rbi/loc.rb', line 12 def begin_column @begin_column end |
#begin_line ⇒ Object (readonly)
Returns the value of attribute begin_line.
12 13 14 |
# File 'lib/rbi/loc.rb', line 12 def begin_line @begin_line end |
#end_column ⇒ Object (readonly)
Returns the value of attribute end_column.
12 13 14 |
# File 'lib/rbi/loc.rb', line 12 def end_column @end_column end |
#end_line ⇒ Object (readonly)
Returns the value of attribute end_line.
12 13 14 |
# File 'lib/rbi/loc.rb', line 12 def end_line @end_line end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
9 10 11 |
# File 'lib/rbi/loc.rb', line 9 def file @file end |
Class Method Details
Instance Method Details
#to_s ⇒ Object
32 33 34 |
# File 'lib/rbi/loc.rb', line 32 def to_s "#{file}:#{begin_line}:#{begin_column}-#{end_line}:#{end_column}" end |