Module: Kamaze::Project::Tools::Yardoc::Watchable
- Included in:
- Kamaze::Project::Tools::Yardoc
- Defined in:
- 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)
61 62 63 |
# File 'lib/kamaze/project/tools/yardoc/watchable.rb', line 61 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
49 50 51 52 53 54 55 56 |
# File 'lib/kamaze/project/tools/yardoc/watchable.rb', line 49 def files # @formatter:off [ core.files.to_a.flatten.map { |f| File.new(f, true) }, core..files.to_a.map { |f| File.new(f.filename, false) } ].flatten # @formatter:on end |
#paths ⇒ Array<Pathname>
Get paths
29 30 31 32 33 |
# File 'lib/kamaze/project/tools/yardoc/watchable.rb', line 29 def paths files.map do |file| file.to_a.min end.flatten.compact.uniq.sort end |
#patterns ⇒ Array<String>
Get patterns (usable for glob pattern matching)
38 39 40 |
# File 'lib/kamaze/project/tools/yardoc/watchable.rb', line 38 def patterns files.map(&:to_s) end |