Class: Textbringer::Mark
- Inherits:
-
Object
- Object
- Textbringer::Mark
- Defined in:
- lib/textbringer/buffer.rb
Instance Attribute Summary collapse
-
#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.
1298 1299 1300 1301 |
# File 'lib/textbringer/buffer.rb', line 1298 def initialize(buffer, location) @buffer = buffer @location = location end |
Instance Attribute Details
#location ⇒ Object
Returns the value of attribute location.
1296 1297 1298 |
# File 'lib/textbringer/buffer.rb', line 1296 def location @location end |
Instance Method Details
#delete ⇒ Object
1303 1304 1305 |
# File 'lib/textbringer/buffer.rb', line 1303 def delete @buffer.marks.delete(self) end |
#dup ⇒ Object
1307 1308 1309 1310 1311 |
# File 'lib/textbringer/buffer.rb', line 1307 def dup mark = @buffer.new_mark mark.location = @location mark end |