Add Task#[]
This commit is contained in:
1 parent
f2a56f1c61
commit
ac0f6087fc
3 files changed
+44
No files matched your search
@@ -131,6 +131,21 @@ module Rscons
|
||||
modify(options, &block)
|
||||
end
|
||||
|
||||
# Get a parameter's value.
|
||||
#
|
||||
# @param param_name [String]
|
||||
# Parameter name.
|
||||
#
|
||||
# @return [String]
|
||||
# Parameter value.
|
||||
def [](param_name)
|
||||
param = @params[param_name]
|
||||
unless param
|
||||
raise RsconsError.new("Could not find parameter '#{param_name}'")
|
||||
end
|
||||
param.value
|
||||
end
|
||||
|
||||
# Execute a task's actions.
|
||||
#
|
||||
# @return [void]
|
||||
|
||||
Reference in new issue
Block a user