Class: File
- Inherits:
-
Object
- Object
- File
- Defined in:
- lib/taglob/extensions/file.rb
Class Method Summary collapse
Class Method Details
.parse_tags(line) ⇒ Object
10 11 12 |
# File 'lib/taglob/extensions/file.rb', line 10 def self.(line) line =~ /^# ?tags:\s+(.*)/ ? $1.split(',').map {|tag| tag.strip} : [] end |
.tags(file) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/taglob/extensions/file.rb', line 2 def self.(file) = [] File.readlines(file).each do |line| = | self.(line) end end |