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.



1298
1299
1300
1301
# File 'lib/textbringer/buffer.rb', line 1298

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

Instance Attribute Details

#locationObject

Returns the value of attribute location.



1296
1297
1298
# File 'lib/textbringer/buffer.rb', line 1296

def location
  @location
end

Instance Method Details

#deleteObject



1303
1304
1305
# File 'lib/textbringer/buffer.rb', line 1303

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

#dupObject



1307
1308
1309
1310
1311
# File 'lib/textbringer/buffer.rb', line 1307

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