Class: Diakonos::TextMark

Inherits:
Object show all
Includes:
RangeDelegator
Defined in:
lib/diakonos/text-mark.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#formattingObject (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_sObject



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