Module: Landlock::ResultBehavior
- Included in:
- CaptureResult
- Defined in:
- lib/landlock/result.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
- #inspect ⇒ Object
- #output_truncated? ⇒ Boolean
- #success? ⇒ Boolean
- #timed_out? ⇒ Boolean
- #to_ary ⇒ Object
- #to_s ⇒ Object
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/landlock/result.rb', line 5 def status @status end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
5 6 7 |
# File 'lib/landlock/result.rb', line 5 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
5 6 7 |
# File 'lib/landlock/result.rb', line 5 def stdout @stdout end |
Instance Method Details
#inspect ⇒ Object
27 28 29 |
# File 'lib/landlock/result.rb', line 27 def inspect "#<#{self.class} status=#{status.inspect} timed_out=#{timed_out?} output_truncated=#{output_truncated?} stdout=#{stdout.inspect} stderr=#{stderr.inspect}>" end |
#output_truncated? ⇒ Boolean
11 12 13 |
# File 'lib/landlock/result.rb', line 11 def output_truncated? @output_truncated end |
#success? ⇒ Boolean
7 8 9 |
# File 'lib/landlock/result.rb', line 7 def success? !timed_out? && status&.success? end |
#timed_out? ⇒ Boolean
15 16 17 |
# File 'lib/landlock/result.rb', line 15 def timed_out? @timed_out end |
#to_ary ⇒ Object
19 20 21 |
# File 'lib/landlock/result.rb', line 19 def to_ary [stdout, stderr, status] end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/landlock/result.rb', line 23 def to_s stdout.to_s end |