Class: Tags
- Inherits:
-
Object
- Object
- Tags
- Defined in:
- lib/ctags_ruby/tags.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#mask ⇒ Object
readonly
Returns the value of attribute mask.
Instance Method Summary collapse
- #find_expression ⇒ Object
- #generate ⇒ Object
-
#initialize(filename = ".tags", mask = '*.rb') ⇒ Tags
constructor
A new instance of Tags.
Constructor Details
#initialize(filename = ".tags", mask = '*.rb') ⇒ Tags
Returns a new instance of Tags.
4 5 6 |
# File 'lib/ctags_ruby/tags.rb', line 4 def initialize(filename = ".tags", mask = '*.rb') @filename, @mask = filename, mask end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
3 4 5 |
# File 'lib/ctags_ruby/tags.rb', line 3 def filename @filename end |
#mask ⇒ Object (readonly)
Returns the value of attribute mask.
3 4 5 |
# File 'lib/ctags_ruby/tags.rb', line 3 def mask @mask end |
Instance Method Details
#find_expression ⇒ Object
12 13 14 |
# File 'lib/ctags_ruby/tags.rb', line 12 def find_expression "find . -name '#{mask}' | ctags -f #{filename} -L -" end |
#generate ⇒ Object
8 9 10 |
# File 'lib/ctags_ruby/tags.rb', line 8 def generate system find_expression end |