Class: TaskJuggler::TagFile::TagFileEntry
- Defined in:
- lib/taskjuggler/reports/TagFile.rb
Overview
The TagFileEntry class is used to store the intermediate representation of the TagFile.
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
-
#<=>(e) ⇒ Object
Used to sort the tag file entries by tag.
-
#initialize(tag, file, line, kind) ⇒ TagFileEntry
constructor
Create a new TagFileEntry object.
-
#to_ctags ⇒ Object
Convert the entry into a ctags compatible line.
Constructor Details
#initialize(tag, file, line, kind) ⇒ TagFileEntry
Create a new TagFileEntry object. tag is the property ID. file is the source file name, line the line number in this file. kind specifies the property type. The following types should be used: r : Resource t : Task p : Report
35 36 37 38 39 40 |
# File 'lib/taskjuggler/reports/TagFile.rb', line 35 def initialize(tag, file, line, kind) @tag = tag @file = file @line = line @kind = kind end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
27 28 29 |
# File 'lib/taskjuggler/reports/TagFile.rb', line 27 def file @file end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
27 28 29 |
# File 'lib/taskjuggler/reports/TagFile.rb', line 27 def kind @kind end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
27 28 29 |
# File 'lib/taskjuggler/reports/TagFile.rb', line 27 def line @line end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
27 28 29 |
# File 'lib/taskjuggler/reports/TagFile.rb', line 27 def tag @tag end |
Instance Method Details
#<=>(e) ⇒ Object
Used to sort the tag file entries by tag.
43 44 45 |
# File 'lib/taskjuggler/reports/TagFile.rb', line 43 def <=>(e) @tag <=> e.tag end |
#to_ctags ⇒ Object
Convert the entry into a ctags compatible line.
48 49 50 |
# File 'lib/taskjuggler/reports/TagFile.rb', line 48 def "#{@tag}\t#{@file}\t#{@line};\"\t#{@kind}\n" end |