Class: VER::Bookmarks::Bookmark
- Includes:
- Comparable
- Defined in:
- lib/ver/methods/bookmark.rb
Constant Summary
Constants inherited from Struct
Instance Attribute Summary collapse
-
#char ⇒ Object
Returns the value of attribute char.
-
#file ⇒ Object
Returns the value of attribute file.
-
#line ⇒ Object
Returns the value of attribute line.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Methods inherited from Struct
Instance Attribute Details
#char ⇒ Object
Returns the value of attribute char
181 182 183 |
# File 'lib/ver/methods/bookmark.rb', line 181 def char @char end |
#file ⇒ Object
Returns the value of attribute file
181 182 183 |
# File 'lib/ver/methods/bookmark.rb', line 181 def file @file end |
#line ⇒ Object
Returns the value of attribute line
181 182 183 |
# File 'lib/ver/methods/bookmark.rb', line 181 def line @line end |
#name ⇒ Object
Returns the value of attribute name
181 182 183 |
# File 'lib/ver/methods/bookmark.rb', line 181 def name @name end |
Instance Method Details
#<=>(other) ⇒ Object
184 185 186 |
# File 'lib/ver/methods/bookmark.rb', line 184 def <=>(other) [file, index] <=> [other.file, other.index] end |
#index ⇒ Object
188 189 190 |
# File 'lib/ver/methods/bookmark.rb', line 188 def index [line, char] end |
#index=(index) ⇒ Object
192 193 194 |
# File 'lib/ver/methods/bookmark.rb', line 192 def index=(index) self.line, self.char = *index end |
#to_a ⇒ Object
196 197 198 |
# File 'lib/ver/methods/bookmark.rb', line 196 def to_a [name, file, *index] end |