Class: CtagsReader::Tag
- Inherits:
-
Struct
- Object
- Struct
- CtagsReader::Tag
- Defined in:
- lib/ctags_reader/tag.rb
Overview
The Tag is the representation of each tag in the tags file. It can be initialized manually by giving it its four components, but it can also be created from a tab-delimited line from the file.
Instance Attribute Summary collapse
-
#ex_command ⇒ Object
Returns the value of attribute ex_command.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#ex_command ⇒ Object
Returns the value of attribute ex_command
6 7 8 |
# File 'lib/ctags_reader/tag.rb', line 6 def ex_command @ex_command end |
#filename ⇒ Object
Returns the value of attribute filename
6 7 8 |
# File 'lib/ctags_reader/tag.rb', line 6 def filename @filename end |
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/ctags_reader/tag.rb', line 6 def name @name end |
#type ⇒ Object
Returns the value of attribute type
6 7 8 |
# File 'lib/ctags_reader/tag.rb', line 6 def type @type end |
Class Method Details
.from_string(string) ⇒ Object
7 8 9 10 |
# File 'lib/ctags_reader/tag.rb', line 7 def self.from_string(string) name, filename, ex_command, type = string.split("\t") new(name, filename, ex_command, type) end |
Instance Method Details
#line_number ⇒ Object
12 13 14 |
# File 'lib/ctags_reader/tag.rb', line 12 def line_number @line_number ||= calculate_line_number end |