Class: Diakonos::TextMark
- Includes:
- RangeDelegator
- Defined in:
- lib/diakonos/text-mark.rb
Instance Attribute Summary collapse
-
#formatting ⇒ Object
readonly
Returns the value of attribute formatting.
Instance Method Summary collapse
-
#initialize(range, formatting) ⇒ TextMark
constructor
A new instance of TextMark.
- #to_s ⇒ Object
Methods included from RangeDelegator
#contains?, #end_col, #end_row, #start_col, #start_row
Constructor Details
#initialize(range, formatting) ⇒ TextMark
Returns a new instance of TextMark.
9 10 11 12 |
# File 'lib/diakonos/text-mark.rb', line 9 def initialize( range, formatting ) @range = range @formatting = formatting end |
Instance Attribute Details
#formatting ⇒ Object (readonly)
Returns the value of attribute formatting.
6 7 8 |
# File 'lib/diakonos/text-mark.rb', line 6 def formatting @formatting end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/diakonos/text-mark.rb', line 14 def to_s "(#{@range.start_row},#{@range.start_col})-(#{@range.end_row},#{@range.end_col}) #{formatting}" end |