Class: Textbringer::Mark

Inherits:
Object
  • Object
show all
Defined in:
lib/textbringer/buffer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(buffer, location) ⇒ Mark

Returns a new instance of Mark.



1375
1376
1377
1378
# File 'lib/textbringer/buffer.rb', line 1375

def initialize(buffer, location)
  @buffer = buffer
  @location = location
end

Instance Attribute Details

#bufferObject (readonly)

Returns the value of attribute buffer.



1372
1373
1374
# File 'lib/textbringer/buffer.rb', line 1372

def buffer
  @buffer
end

#locationObject

Returns the value of attribute location.



1373
1374
1375
# File 'lib/textbringer/buffer.rb', line 1373

def location
  @location
end

Instance Method Details

#deleteObject



1380
1381
1382
# File 'lib/textbringer/buffer.rb', line 1380

def delete
  @buffer.marks.delete(self)
end

#dupObject



1384
1385
1386
1387
1388
# File 'lib/textbringer/buffer.rb', line 1384

def dup
  mark = @buffer.new_mark
  mark.location = @location
  mark
end