class Textbringer::Mark
Attributes
buffer[R]
file_name[R]
location[RW]
Public Class Methods
new(buffer, location)
click to toggle source
# File lib/textbringer/buffer.rb, line 1629 def initialize(buffer, location) @buffer = buffer @file_name = nil @location = location end
Public Instance Methods
delete()
click to toggle source
# File lib/textbringer/buffer.rb, line 1639 def delete if @buffer @buffer.marks.delete(self) end end
deleted?()
click to toggle source
# File lib/textbringer/buffer.rb, line 1645 def deleted? !@buffer.marks.include?(self) end
detach()
click to toggle source
# File lib/textbringer/buffer.rb, line 1649 def detach if @buffer @file_name = @buffer.file_name @buffer = nil end end
detached?()
click to toggle source
# File lib/textbringer/buffer.rb, line 1656 def detached? @buffer.nil? end
dup()
click to toggle source
# File lib/textbringer/buffer.rb, line 1660 def dup mark = @buffer.new_mark mark.location = @location mark end
inspect()
click to toggle source
# File lib/textbringer/buffer.rb, line 1635 def inspect "#<Mark:#{@buffer&.name || @file_name}:#{@location}>" end