class Run::Context
- Run::Context
- Reference
- Object
Defined in:
run/context.crConstructors
-
.new(name : Symbol, command : String, args : Array(String), **attrs)
Initializes a new context with the attributes.
-
.new(command : String, args : Array(String), **attrs)
Initializes a new context with the attributes.
-
.new(command : String, **attrs)
Initializes a new context with the attributes.
-
.new(name : Symbol, **attrs)
Initializes a new context with the attributes.
-
.new(**attrs)
Initializes a new context with the attributes.
Instance Method Summary
-
#abort_on_error(value : Bool | Nil) : Context
Sets the abort_on_error attribute to false and returns self.
-
#abort_on_error! : Context
Sets the abort_on_error attribute to true and returns self.
-
#abort_signal(value : Signal | Nil)
Sets the abort_signal attribute and returns self.
-
#abort_signal : Signal
Returns the combined value of the abort_signal attribute in the nested context.
-
#abort_signal=(value : Signal | Nil)
Sets the abort_signal attribute.
-
#abort_timeout(value : Timeout::Arg | Nil)
Sets the abort_timeout attribute and returns self.
-
#abort_timeout : Timeout::Arg
Returns the combined value of the abort_timeout attribute in the nested context.
-
#abort_timeout=(value : Timeout::Arg | Nil)
Sets the abort_timeout attribute.
-
#aborts_on_error? : Bool
Returns the combined value of the abort_on_error attribute in the context.
-
#args(value : Array(String) | Nil)
Sets the args attribute and returns self.
-
#args : Array(String)
Returns the combined value of the args attribute in the nested context.
-
#args=(value : Array(String) | Nil)
Sets the args attribute.
-
#chdir(value : String | Nil)
Sets the chdir attribute and returns self.
-
#chdir : String
Returns the combined value of the chdir attribute in the nested context.
-
#chdir=(value : String | Nil)
Sets the chdir attribute.
-
#clear_env(value : Bool | Nil) : Context
Sets the clear_env attribute to false and returns self.
-
#clear_env! : Context
Sets the clear_env attribute to true and returns self.
-
#clears_env? : Bool
Returns the combined value of the clear_env attribute in the context.
-
#command(value : String | Nil)
Sets the command attribute and returns self.
-
#command : String
Returns the combined value of the command attribute in the nested context.
-
#command=(value : String | Nil)
Sets the command attribute.
-
#dup
Copies this context.
-
#env(value : Hash(String, String) | Nil)
Sets the env attribute and returns self.
-
#env : Hash(String, String)
Returns the combined value of the env attribute in the nested context.
-
#env=(value : Hash(String, String) | Nil)
Sets the env attribute.
-
#error(value : Io::Arg | Nil)
Sets the error attribute and returns self.
-
#error : Io::Arg
Returns the combined value of the error attribute in the nested context.
-
#error=(value : Io::Arg | Nil)
Sets the error attribute.
-
#input(value : Io::Arg | Nil)
Sets the input attribute and returns self.
-
#input : Io::Arg
Returns the combined value of the input attribute in the nested context.
-
#input=(value : Io::Arg | Nil)
Sets the input attribute.
-
#name(value : String | Nil)
Sets the name attribute and returns self.
-
#name : Union(String, Nil)
Returns the combined value of the name attribute in the nested context.
-
#name=(value : String | Nil)
Sets the name attribute.
-
#not_parallel! : Context
Sets the parallel attribute to false and returns self.
-
#not_shell! : Context
Sets the shell attribute to false and returns self.
-
#not_to_aborts_on_error! : Context
Sets the abort_on_error attribute to false and returns self.
-
#not_to_clears_env! : Context
Sets the clear_env attribute to false and returns self.
-
#not_to_shows_command! : Context
Sets the show_command attribute to false and returns self.
-
#not_to_shows_dir! : Context
Sets the show_dir attribute to false and returns self.
-
#output(value : Io::Arg | Nil)
Sets the output attribute and returns self.
-
#output : Io::Arg
Returns the combined value of the output attribute in the nested context.
-
#output=(value : Io::Arg | Nil)
Sets the output attribute.
-
#parallel(value : Bool | Nil) : Context
Sets the parallel attribute to false and returns self.
-
#parallel! : Context
Sets the parallel attribute to true and returns self.
-
#parallel? : Bool
Returns the combined value of the parallel attribute in the context.
-
#parent(value : Context | Nil)
Sets the parent attribute and returns self.
-
#parent
Returns this parent context.
-
#parent=(value : Context | Nil)
Sets the parent attribute.
-
#parent? : Context | Nil
Returns this parent context.
-
#root : Context
Returns the root context in the nested contexts.
-
#root?
Tests if this context is the root in the nested contexts.
-
#self_abort_on_error : Bool | Nil
Returns the abort_on_error attribute.
-
#self_abort_signal : Signal | Nil
Returns the abort_signal attribute.
-
#self_abort_timeout : Timeout::Arg | Nil
Returns the abort_timeout attribute.
-
#self_args : Array(String) | Nil
Returns the args attribute.
-
#self_chdir : String | Nil
Returns the chdir attribute.
-
#self_clear_env : Bool | Nil
Returns the clear_env attribute.
-
#self_command : String | Nil
Returns the command attribute.
-
#self_env : Hash(String, String) | Nil
Returns the env attribute.
-
#self_error : Io::Arg | Nil
Returns the error attribute.
-
#self_input : Io::Arg | Nil
Returns the input attribute.
-
#self_name : String | Nil
Returns the name attribute.
-
#self_output : Io::Arg | Nil
Returns the output attribute.
-
#self_parallel : Bool | Nil
Returns the parallel attribute.
-
#self_shell : Bool | Nil
Returns the shell attribute.
-
#self_show_command : Bool | Nil
Returns the show_command attribute.
-
#self_show_dir : Bool | Nil
Returns the show_dir attribute.
-
#set(name : String | Nil = nil, command : String | Nil = nil, args : Array(String) | Nil = nil, parent : Context | Nil = nil, env : Hash(String, String) | Nil = nil, clear_env : Bool | Nil = nil, shell : Bool | Nil = nil, input : Io::Arg = nil, output : Io::Arg = nil, error : Io::Arg = nil, chdir : String | Nil = nil, show_dir : Bool | Nil = nil, show_command : Bool | Nil = nil, abort_signal : Signal | Nil = nil, parallel : Bool | Nil = nil, abort_on_error : Bool | Nil = nil, abort_timeout : Timeout::Arg = nil, current_dir : String | Nil = nil)
Sets the attributes and returns self.
-
#shell(value : Bool | Nil) : Context
Sets the shell attribute to false and returns self.
-
#shell! : Context
Sets the shell attribute to true and returns self.
-
#shell? : Bool
Returns the combined value of the shell attribute in the context.
-
#show_command(value : Bool | Nil) : Context
Sets the show_command attribute to false and returns self.
-
#show_command! : Context
Sets the show_command attribute to true and returns self.
-
#show_dir(value : Bool | Nil) : Context
Sets the show_dir attribute to false and returns self.
-
#show_dir! : Context
Sets the show_dir attribute to true and returns self.
-
#shows_command? : Bool
Returns the combined value of the show_command attribute in the context.
-
#shows_dir? : Bool
Returns the combined value of the show_dir attribute in the context.
Constructor Detail
Initializes a new context with the attributes.
For more information about the arguments, see #set
.
Initializes a new context with the attributes.
For more information about the arguments, see #set
.
Initializes a new context with the attributes.
For more information about the arguments, see #set
.
Initializes a new context with the attributes.
For more information about the arguments, see #set
.
Initializes a new context with the attributes.
For more information about the arguments, see #set
.
Instance Method Detail
Sets the abort_on_error attribute to false and returns self.
Sets the abort_on_error attribute to true and returns self.
Returns the combined value of the abort_signal attribute in the nested context.
Returns the combined value of the abort_timeout attribute in the nested context.
Returns the combined value of the abort_on_error attribute in the context.
Sets the clear_env attribute to false and returns self.
Returns the combined value of the env attribute in the nested context.
Returns the combined value of the error attribute in the nested context.
Returns the combined value of the input attribute in the nested context.
Returns the combined value of the name attribute in the nested context.
Sets the abort_on_error attribute to false and returns self.
Sets the clear_env attribute to false and returns self.
Sets the show_command attribute to false and returns self.
Sets the show_dir attribute to false and returns self.
Returns the combined value of the output attribute in the nested context.
Sets the parallel attribute to false and returns self.
Sets the attributes and returns self.
If nil is specified, the attribute is not changed.
For more information about the context attributes, see Wiki.
Sets the shell attribute to false and returns self.
Sets the show_command attribute to false and returns self.
Sets the show_command attribute to true and returns self.
Sets the show_dir attribute to false and returns self.
Returns the combined value of the show_command attribute in the context.