Class: Taglob::Rake::CheckTagsTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Taglob::Rake::CheckTagsTask
- Defined in:
- lib/taglob/rake/check_tags_task.rb
Overview
end
Instance Attribute Summary collapse
-
#pattern ⇒ Object
Returns the value of attribute pattern.
-
#valid_tag_source ⇒ Object
Returns the value of attribute valid_tag_source.
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize(name = :check_tags) {|_self| ... } ⇒ CheckTagsTask
constructor
A new instance of CheckTagsTask.
- #valid_tag_list ⇒ Object
Constructor Details
#initialize(name = :check_tags) {|_self| ... } ⇒ CheckTagsTask
Returns a new instance of CheckTagsTask.
20 21 22 23 24 |
# File 'lib/taglob/rake/check_tags_task.rb', line 20 def initialize(name = :check_tags) @name = name yield self if block_given? define end |
Instance Attribute Details
#pattern ⇒ Object
Returns the value of attribute pattern.
17 18 19 |
# File 'lib/taglob/rake/check_tags_task.rb', line 17 def pattern @pattern end |
#valid_tag_source ⇒ Object
Returns the value of attribute valid_tag_source.
18 19 20 |
# File 'lib/taglob/rake/check_tags_task.rb', line 18 def valid_tag_source @valid_tag_source end |
Instance Method Details
#define ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/taglob/rake/check_tags_task.rb', line 26 def define task @name do = Taglob.(pattern,valid_tag_list) .each {|file,| $stderr.puts "Invalid tags: #{.join(',')} found in #{file}." } exit 1 if !.empty? end end |
#valid_tag_list ⇒ Object
34 35 36 |
# File 'lib/taglob/rake/check_tags_task.rb', line 34 def valid_tag_list var = File.readlines(valid_tag_source).collect {|line| line.chomp } end |