Class: Kamaze::Project::Tools::Yardoc
- Inherits:
-
BaseTool
- Object
- Observable
- BaseTool
- Kamaze::Project::Tools::Yardoc
- Includes:
- Watchable
- Defined in:
- lib/kamaze/project/tools/yardoc.rb,
lib/kamaze/project/tools/yardoc.rb,
lib/kamaze/project/tools/yardoc/watcher.rb,
lib/kamaze/project/tools/yardoc/watchable.rb
Overview
rubocop:disable Style/Documentation
Defined Under Namespace
Modules: Watchable Classes: File, Watcher
Instance Attribute Summary collapse
- #observer_peers ⇒ Hash|nil included from Concern::Observable readonly protected
-
#options ⇒ Hash
Options used by
YARD::CLI::Yardoc
.
Instance Method Summary collapse
- #core ⇒ YARD::CLI::Yardoc protected
-
#excluded ⇒ Array<String>
included
from Watchable
Ignores files matching path match (regexp).
-
#files ⇒ Array<Kamaze::Project::Tools::Yardoc::File>
included
from Watchable
Get files.
- #mutable_attributes ⇒ Object
-
#output_dir ⇒ Pathname
Get output directory (default SHOULD be
doc
). -
#paths ⇒ Array<Pathname>
included
from Watchable
Get paths.
-
#patterns ⇒ Array<String>
included
from Watchable
Get patterns (usable for glob pattern matching).
- #run ⇒ Fixnum (also: #call)
- #setup ⇒ Object protected
Constructor Details
This class inherits a constructor from Kamaze::Project::Tools::BaseTool
Instance Attribute Details
#observer_peers ⇒ Hash|nil (readonly, protected) Originally defined in module Concern::Observable
#options ⇒ Hash
Options used by YARD::CLI::Yardoc
35 36 37 |
# File 'lib/kamaze/project/tools/yardoc.rb', line 35 def @options end |
Instance Method Details
#core ⇒ YARD::CLI::Yardoc (protected)
68 69 70 71 72 73 74 |
# File 'lib/kamaze/project/tools/yardoc.rb', line 68 def core YARD::CLI::Yardoc.new.tap do |yard| yard.parse_arguments([]) .to_h.each { |k, v| yard.[k.to_sym] = v } end end |
#excluded ⇒ Array<String> Originally defined in module Watchable
Ignores files matching path match (regexp)
#files ⇒ Array<Kamaze::Project::Tools::Yardoc::File> Originally defined in module Watchable
Get files
Mostly patterns,
addition of files
with options.files
SHOULD include README
file, when .yardopts
defined
#mutable_attributes ⇒ Object
57 58 59 |
# File 'lib/kamaze/project/tools/yardoc.rb', line 57 def mutable_attributes [:options] end |
#output_dir ⇒ Pathname
Get output directory (default SHOULD be doc
)
48 49 50 51 52 53 |
# File 'lib/kamaze/project/tools/yardoc.rb', line 48 def output_dir core. .yield_self(&:serializer) .yield_self(&:basepath).gsub(%r{^\./+}, '') .yield_self { |path| ::Pathname.new(path) } end |
#paths ⇒ Array<Pathname> Originally defined in module Watchable
Get paths
#patterns ⇒ Array<String> Originally defined in module Watchable
Get patterns (usable for glob pattern matching)
#run ⇒ Fixnum Also known as: call
38 39 40 41 42 43 |
# File 'lib/kamaze/project/tools/yardoc.rb', line 38 def run retcode = core.run retcode = retcode ? 0 : 1 if [true, false].include?(retcode) retcode end |
#setup ⇒ Object (protected)
63 64 65 |
# File 'lib/kamaze/project/tools/yardoc.rb', line 63 def setup @options ||= {} end |