Method: YARD::CLI::Yardoc#parse_arguments
- Defined in:
- lib/yard/cli/yardoc.rb
#parse_arguments(*args) ⇒ Boolean
Parses commandline arguments
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/yard/cli/yardoc.rb', line 291 def parse_arguments(*args) super(*args) # Last minute modifications self.files = Parser::SourceParser::DEFAULT_PATH_GLOB if files.empty? files.delete_if {|x| x =~ /\A\s*\Z/ } # remove empty ones readme = Dir.glob('README{,*[^~]}'). sort_by {|r| [r.count('.'), r.index('.'), r] }.first readme ||= Dir.glob(files.first).first if .onefile && !files.empty? .readme ||= CodeObjects::ExtraFileObject.new(readme) if readme .files.unshift(.readme).uniq! if .readme Tags::Library. -= add_visibility_verifier add_api_verifier apply_locale # US-ASCII is invalid encoding for onefile if defined?(::Encoding) && .onefile if ::Encoding.default_internal == ::Encoding::US_ASCII log.warn "--one-file is not compatible with US-ASCII encoding, using ASCII-8BIT" ::Encoding.default_external, ::Encoding.default_internal = ['ascii-8bit'] * 2 end end if generate && ! false else true end end |