Class: Rails::Hyperdrive::ConsoleExecutor::Result
- Inherits:
-
Struct
- Object
- Struct
- Rails::Hyperdrive::ConsoleExecutor::Result
- Defined in:
- lib/rails/hyperdrive/console_executor.rb
Instance Attribute Summary collapse
-
#elapsed_ms ⇒ Object
Returns the value of attribute elapsed_ms.
-
#exception ⇒ Object
Returns the value of attribute exception.
-
#result ⇒ Object
Returns the value of attribute result.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
Instance Attribute Details
#elapsed_ms ⇒ Object
Returns the value of attribute elapsed_ms
9 10 11 |
# File 'lib/rails/hyperdrive/console_executor.rb', line 9 def elapsed_ms @elapsed_ms end |
#exception ⇒ Object
Returns the value of attribute exception
9 10 11 |
# File 'lib/rails/hyperdrive/console_executor.rb', line 9 def exception @exception end |
#result ⇒ Object
Returns the value of attribute result
9 10 11 |
# File 'lib/rails/hyperdrive/console_executor.rb', line 9 def result @result end |
#stderr ⇒ Object
Returns the value of attribute stderr
9 10 11 |
# File 'lib/rails/hyperdrive/console_executor.rb', line 9 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout
9 10 11 |
# File 'lib/rails/hyperdrive/console_executor.rb', line 9 def stdout @stdout end |
Instance Method Details
#to_h ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rails/hyperdrive/console_executor.rb', line 10 def to_h { result: result.inspect, stdout: stdout, stderr: stderr, elapsed_ms: elapsed_ms, exception: exception && { class: exception.class.name, message: exception., backtrace: Array(exception.backtrace).first(20) } } end |