class Diakonos::Bookmark
Attributes
buffer[R]
col[R]
name[R]
row[R]
Public Class Methods
new( buffer, row, col, name = nil )
click to toggle source
# File lib/diakonos/bookmark.rb, line 7 def initialize( buffer, row, col, name = nil ) @buffer = buffer @row = row @col = col @name = name end
Public Instance Methods
<(other)
click to toggle source
# File lib/diakonos/bookmark.rb, line 28 def < (other) ( ( self <=> other ) < 0 ) end
<=>(other)
click to toggle source
# File lib/diakonos/bookmark.rb, line 19 def <=> (other) return nil if other.nil? comparison = ( $diakonos.buffer_to_number( @buffer ) <=> $diakonos.buffer_to_number( other.buffer ) ) return comparison if comparison != 0 comparison = ( @row <=> other.row ) return comparison if comparison != 0 @col <=> other.col end
==(other)
click to toggle source
# File lib/diakonos/bookmark.rb, line 14 def == (other) return false if other.nil? ( @buffer == other.buffer && @row == other.row && @col == other.col ) end
>(other)
click to toggle source
# File lib/diakonos/bookmark.rb, line 31 def > (other) ( ( self <=> other ) > 0 ) end
shift( row_inc, col_inc )
click to toggle source
# File lib/diakonos/bookmark.rb, line 35 def shift( row_inc, col_inc ) row += row_inc col += col_inc end
to_s()
click to toggle source
# File lib/diakonos/bookmark.rb, line 40 def to_s "[#{@name}|#{@buffer.name}:#{@row+1},#{@col+1}]" end