Module: Kamaze::Project::Tools::Yardoc::Watchable
- Included in:
- Kamaze::Project::Tools::Yardoc
- Defined in:
- lib/kamaze/project/tools/yardoc/watchable.rb,
lib/kamaze/project/tools/yardoc/watchable.rb
Overview
Provide watch related methods
Yardoc (wrapper class) is used by a Watcher using tools it MUST provide some methods used to:
- initialize
Listen
- provide patterns (glob pattern matching)
Instance of YARD::CLI::Yardoc
is retrieved through core
method
Defined Under Namespace
Classes: File
Instance Method Summary collapse
-
#excluded ⇒ Array<String>
Ignores files matching path match (regexp).
-
#files ⇒ Array<Kamaze::Project::Tools::Yardoc::File>
Get files.
-
#paths ⇒ Array<Pathname>
Get paths.
-
#patterns ⇒ Array<String>
Get patterns (usable for glob pattern matching).
Instance Method Details
#excluded ⇒ Array<String>
Ignores files matching path match (regexp)
67 68 69 |
# File 'lib/kamaze/project/tools/yardoc/watchable.rb', line 67 def excluded core.excluded end |
#files ⇒ Array<Kamaze::Project::Tools::Yardoc::File>
Get files
Mostly patterns,
addition of files
with options.files
SHOULD include README
file, when .yardopts
defined
57 58 59 60 61 62 |
# File 'lib/kamaze/project/tools/yardoc/watchable.rb', line 57 def files [ core.files.to_a.flatten.map { |f| File.new(f, true) }, core..files.to_a.map { |f| File.new(f.filename, false) } ].flatten end |
#paths ⇒ Array<Pathname>
Get paths
37 38 39 40 41 |
# File 'lib/kamaze/project/tools/yardoc/watchable.rb', line 37 def paths files.map do |file| file.to_a.sort[0] end.flatten.compact.uniq.sort end |
#patterns ⇒ Array<String>
Get patterns (usable for glob pattern matching)
46 47 48 |
# File 'lib/kamaze/project/tools/yardoc/watchable.rb', line 46 def patterns files.map(&:to_s) end |