Class: Frontkick::Result
- Inherits:
-
Object
- Object
- Frontkick::Result
- Defined in:
- lib/frontkick/result.rb
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#exit_code ⇒ Object
(also: #status)
Returns the value of attribute exit_code.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(params) ⇒ Result
constructor
A new instance of Result.
- #output ⇒ Object
- #successful? ⇒ Boolean
Constructor Details
#initialize(params) ⇒ Result
Returns a new instance of Result.
7 8 9 10 11 12 |
# File 'lib/frontkick/result.rb', line 7 def initialize(params) @stdout = params[:stdout] || "" @stderr = params[:stderr] || "" @exit_code = params[:exit_code] || 0 @duration = params[:duration] || 0 end |
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
3 4 5 |
# File 'lib/frontkick/result.rb', line 3 def duration @duration end |
#exit_code ⇒ Object Also known as: status
Returns the value of attribute exit_code.
3 4 5 |
# File 'lib/frontkick/result.rb', line 3 def exit_code @exit_code end |
#stderr ⇒ Object
Returns the value of attribute stderr.
3 4 5 |
# File 'lib/frontkick/result.rb', line 3 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout.
3 4 5 |
# File 'lib/frontkick/result.rb', line 3 def stdout @stdout end |
Instance Method Details
#errors ⇒ Object
18 19 20 |
# File 'lib/frontkick/result.rb', line 18 def errors @stderr end |
#output ⇒ Object
14 15 16 |
# File 'lib/frontkick/result.rb', line 14 def output @stdout end |
#successful? ⇒ Boolean
22 23 24 |
# File 'lib/frontkick/result.rb', line 22 def successful? @exit_code == 0 end |