Class: Textbringer::Mark
- Inherits:
-
Object
- Object
- Textbringer::Mark
- Defined in:
- lib/textbringer/buffer.rb
Instance Attribute Summary collapse
-
#buffer ⇒ Object
readonly
Returns the value of attribute buffer.
-
#location ⇒ Object
Returns the value of attribute location.
Instance Method Summary collapse
- #delete ⇒ Object
- #dup ⇒ Object
-
#initialize(buffer, location) ⇒ Mark
constructor
A new instance of Mark.
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
#buffer ⇒ Object (readonly)
Returns the value of attribute buffer.
1372 1373 1374 |
# File 'lib/textbringer/buffer.rb', line 1372 def buffer @buffer end |
#location ⇒ Object
Returns the value of attribute location.
1373 1374 1375 |
# File 'lib/textbringer/buffer.rb', line 1373 def location @location end |
Instance Method Details
#delete ⇒ Object
1380 1381 1382 |
# File 'lib/textbringer/buffer.rb', line 1380 def delete @buffer.marks.delete(self) end |
#dup ⇒ Object
1384 1385 1386 1387 1388 |
# File 'lib/textbringer/buffer.rb', line 1384 def dup mark = @buffer.new_mark mark.location = @location mark end |