Class: CTodo::CommentFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/ctodo/localfs.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ CommentFilter

Returns a new instance of CommentFilter.



89
90
91
# File 'lib/ctodo/localfs.rb', line 89

def initialize(path)
  @comment_char = '#' if path.end_with?('.rb')
end

Instance Method Details

#filter(line) ⇒ Object

TODO: build comment filter



94
95
96
97
98
99
100
101
# File 'lib/ctodo/localfs.rb', line 94

def filter(line)
  # disable it for now
  line
#     return line if @comment_char.nil? or line.nil?
#     i = line.index(@comment_char)
#     return '' if i.nil?
#     line[i, line.length-i]
end