Class: InchCI::Worker::Build::Task::YardOptsWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/inch_ci/worker/build/task.rb

Overview

Utility class to extract .yardopts from repo dir

Constant Summary collapse

YARD_DEFAULT_FILES =
["{lib,app}/**/*.rb", "ext/**/*.c"]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ YardOptsWrapper

Returns a new instance of YardOptsWrapper.



136
137
138
139
140
141
142
143
144
# File 'lib/inch_ci/worker/build/task.rb', line 136

def initialize(path)
  old_path = Dir.pwd
  Dir.chdir path
  wrapper = ::Inch::CLI::YardoptsHelper::YardoptsWrapper.new
  wrapper.parse_arguments()
  @paths = wrapper.files == YARD_DEFAULT_FILES ? [] : wrapper.files
  @excluded = wrapper.excluded
  Dir.chdir old_path
end

Instance Attribute Details

#excludedObject (readonly)

Returns the value of attribute excluded.



134
135
136
# File 'lib/inch_ci/worker/build/task.rb', line 134

def excluded
  @excluded
end

#pathsObject (readonly)

Returns the value of attribute paths.



134
135
136
# File 'lib/inch_ci/worker/build/task.rb', line 134

def paths
  @paths
end