added more documentation to get to 100% YARD coverage; fix YARD warnings
This commit is contained in:
1 parent
d87c4990b1
commit
912615535a
13 files changed
+309
-39
No files matched your search
+23
-3
@@ -7,14 +7,17 @@ module Rscons
|
||||
# Class to hold an object that knows how to build a certain type of file.
|
||||
class Builder
|
||||
# Return the name of the builder.
|
||||
#
|
||||
# If not overridden this defaults to the last component of the class name.
|
||||
def name
|
||||
self.class.name.split(":").last
|
||||
end
|
||||
|
||||
# Return a set of default variable values for the Environment to use
|
||||
# unless the user overrides any.
|
||||
# Return a set of default construction variables for the builder.
|
||||
#
|
||||
# @param env [Environment] The Environment.
|
||||
#
|
||||
# @return [Hash] Default construction variables.
|
||||
def default_variables(env)
|
||||
{}
|
||||
end
|
||||
@@ -39,16 +42,33 @@ module Rscons
|
||||
|
||||
# Return whether this builder object is capable of producing a given target
|
||||
# file name from a given source file name.
|
||||
#
|
||||
# @param target [String] The target file name.
|
||||
# @param source [String, Array] The source file name(s).
|
||||
# @param env [Environment] The Environment.
|
||||
#
|
||||
# @return [Boolean]
|
||||
# Whether this builder object is capable of producing a given target
|
||||
# file name from a given source file name.
|
||||
def produces?(target, source, env)
|
||||
false
|
||||
end
|
||||
|
||||
# Check if the cache is up to date for the target and if not execute the
|
||||
# build command.
|
||||
# Return the name of the target or false on failure.
|
||||
#
|
||||
# @param short_cmd_string [String]
|
||||
# Short description of build action to be printed when env.echo ==
|
||||
# :short.
|
||||
# @param target [String] Name of the target file.
|
||||
# @param command [Array<String>]
|
||||
# The command to execute to build the target.
|
||||
# @param sources [Array<String>] Source file name(s).
|
||||
# @param env [Environment] The Environment executing the builder.
|
||||
# @param cache [Cache] The Cache object.
|
||||
#
|
||||
# @return [String,false]
|
||||
# The name of the target on success or false on failure.
|
||||
def standard_build(short_cmd_string, target, command, sources, env, cache)
|
||||
unless cache.up_to_date?(target, command, sources, env)
|
||||
cache.mkdir_p(File.dirname(target))
|
||||
|
||||
Reference in new issue
Block a user