Class: Canon::Xml::LineRangeMapper::LineRange
- Inherits:
-
Struct
- Object
- Struct
- Canon::Xml::LineRangeMapper::LineRange
- Defined in:
- lib/canon/xml/line_range_mapper.rb
Overview
Line range for an element
Instance Attribute Summary collapse
-
#elem ⇒ Object
Returns the value of attribute elem.
-
#end_line ⇒ Object
Returns the value of attribute end_line.
-
#start_line ⇒ Object
Returns the value of attribute start_line.
Instance Method Summary collapse
Instance Attribute Details
#elem ⇒ Object
Returns the value of attribute elem
41 42 43 |
# File 'lib/canon/xml/line_range_mapper.rb', line 41 def elem @elem end |
#end_line ⇒ Object
Returns the value of attribute end_line
41 42 43 |
# File 'lib/canon/xml/line_range_mapper.rb', line 41 def end_line @end_line end |
#start_line ⇒ Object
Returns the value of attribute start_line
41 42 43 |
# File 'lib/canon/xml/line_range_mapper.rb', line 41 def start_line @start_line end |
Instance Method Details
#contains?(line_num) ⇒ Boolean
42 43 44 |
# File 'lib/canon/xml/line_range_mapper.rb', line 42 def contains?(line_num) line_num.between?(start_line, end_line) end |
#length ⇒ Object
46 47 48 |
# File 'lib/canon/xml/line_range_mapper.rb', line 46 def length end_line - start_line + 1 end |