Class: Tex2png::Result
- Inherits:
-
Object
- Object
- Tex2png::Result
- Defined in:
- lib/tex2png/result.rb
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(cmd, io) ⇒ Result
constructor
A new instance of Result.
- #raise! ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(cmd, io) ⇒ Result
Returns a new instance of Result.
5 6 7 8 |
# File 'lib/tex2png/result.rb', line 5 def initialize(cmd, io) @cmd = cmd @raw = io end |
Instance Attribute Details
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
3 4 5 |
# File 'lib/tex2png/result.rb', line 3 def cmd @cmd end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
3 4 5 |
# File 'lib/tex2png/result.rb', line 3 def output @output end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
3 4 5 |
# File 'lib/tex2png/result.rb', line 3 def raw @raw end |
Instance Method Details
#raise! ⇒ Object
18 19 20 |
# File 'lib/tex2png/result.rb', line 18 def raise! ExcutionError.raise!("#{cmd} - #{output}") {!success?} end |
#success? ⇒ Boolean
14 15 16 |
# File 'lib/tex2png/result.rb', line 14 def success? @success ||= Process.wait2(raw.pid)[1].success? end |