add more fields to ThreadedCommand

This commit is contained in:
Josh Holtrop 2017-05-17 09:07:51 -04:00
parent 01851c2872
commit 5d36aa74a0

View File

@ -18,11 +18,23 @@ module Rscons
# output if the Environment's echo mode is :short.
attr_reader :short_description
# @return [Hash]
# Environment Hash to pass to Kernel#system.
attr_reader :system_env
# @return [Hash]
# Options Hash to pass to Kernel#system.
attr_reader :system_options
# @return [Hash]
# Field for Rscons to store the build operation while this threaded
# command is executing.
attr_accessor :build_operation
# @return [Thread]
# The thread waiting on this command to terminate.
attr_accessor :thread
# Create a ThreadedCommand object.
#
# @param command [Array<String>]
@ -35,10 +47,16 @@ module Rscons
# @option options [String] :short_description
# Short description of the command. This will be printed to standard
# output if the Environment's echo mode is :short.
# @option options [Hash] :system_env
# Environment Hash to pass to Kernel#system.
# @option options [Hash] :system_options
# Options Hash to pass to Kernel#system.
def initialize(command, options = {})
@command = command
@builder_info = options[:builder_info]
@short_description = options[:short_description]
@system_env = options[:system_env]
@system_options = options[:system_options]
end
end