Class: LatexFlow::Tools::Generic
- Inherits:
-
Object
- Object
- LatexFlow::Tools::Generic
show all
- Defined in:
- lib/latex-flow/tools/generic.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(command) ⇒ Generic
Returns a new instance of Generic.
9
10
11
|
# File 'lib/latex-flow/tools/generic.rb', line 9
def initialize(command)
@command = command
end
|
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command.
7
8
9
|
# File 'lib/latex-flow/tools/generic.rb', line 7
def command
@command
end
|
#process ⇒ Object
Returns the value of attribute process.
7
8
9
|
# File 'lib/latex-flow/tools/generic.rb', line 7
def process
@process
end
|
#stderr ⇒ Object
Returns the value of attribute stderr.
7
8
9
|
# File 'lib/latex-flow/tools/generic.rb', line 7
def stderr
@stderr
end
|
#stdout ⇒ Object
Returns the value of attribute stdout.
7
8
9
|
# File 'lib/latex-flow/tools/generic.rb', line 7
def stdout
@stdout
end
|
Instance Method Details
#messages(color: false) ⇒ Object
37
38
39
|
# File 'lib/latex-flow/tools/generic.rb', line 37
def messages(color:false)
color ? messages_with_color : @stdout + $/ + @stderr
end
|
#messages_with_color ⇒ Object
41
42
43
|
# File 'lib/latex-flow/tools/generic.rb', line 41
def messages_with_color
@stdout + $/ + @stderr
end
|
#run ⇒ Object
13
14
15
|
# File 'lib/latex-flow/tools/generic.rb', line 13
def run
@process, @stdout, @stderr = systemu(@command)
end
|
#stderr_with_color ⇒ Object
33
34
35
|
# File 'lib/latex-flow/tools/generic.rb', line 33
def stderr_with_color
@stderr
end
|
#stdout_with_color ⇒ Object
25
26
27
|
# File 'lib/latex-flow/tools/generic.rb', line 25
def stdout_with_color
@stdout
end
|
#success? ⇒ Boolean
17
18
19
|
# File 'lib/latex-flow/tools/generic.rb', line 17
def success?
@process.success?
end
|