Class: RailsDoctor::ToolRun
- Inherits:
-
Struct
- Object
- Struct
- RailsDoctor::ToolRun
- Defined in:
- lib/rails_doctor/models.rb
Instance Attribute Summary collapse
-
#available ⇒ Object
Returns the value of attribute available.
-
#command ⇒ Object
Returns the value of attribute command.
-
#duration_ms ⇒ Object
Returns the value of attribute duration_ms.
-
#exit_status ⇒ Object
Returns the value of attribute exit_status.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#name ⇒ Object
Returns the value of attribute name.
-
#skip_reason ⇒ Object
Returns the value of attribute skip_reason.
-
#skipped ⇒ Object
Returns the value of attribute skipped.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ ToolRun
constructor
A new instance of ToolRun.
- #to_h(include_raw: false) ⇒ Object
Constructor Details
#initialize(**kwargs) ⇒ ToolRun
Returns a new instance of ToolRun.
76 77 78 79 80 81 |
# File 'lib/rails_doctor/models.rb', line 76 def initialize(**kwargs) super self.available = true if available.nil? self.skipped = false if skipped.nil? self. ||= {} end |
Instance Attribute Details
#available ⇒ Object
Returns the value of attribute available
63 64 65 |
# File 'lib/rails_doctor/models.rb', line 63 def available @available end |
#command ⇒ Object
Returns the value of attribute command
63 64 65 |
# File 'lib/rails_doctor/models.rb', line 63 def command @command end |
#duration_ms ⇒ Object
Returns the value of attribute duration_ms
63 64 65 |
# File 'lib/rails_doctor/models.rb', line 63 def duration_ms @duration_ms end |
#exit_status ⇒ Object
Returns the value of attribute exit_status
63 64 65 |
# File 'lib/rails_doctor/models.rb', line 63 def exit_status @exit_status end |
#metadata ⇒ Object
Returns the value of attribute metadata
63 64 65 |
# File 'lib/rails_doctor/models.rb', line 63 def @metadata end |
#name ⇒ Object
Returns the value of attribute name
63 64 65 |
# File 'lib/rails_doctor/models.rb', line 63 def name @name end |
#skip_reason ⇒ Object
Returns the value of attribute skip_reason
63 64 65 |
# File 'lib/rails_doctor/models.rb', line 63 def skip_reason @skip_reason end |
#skipped ⇒ Object
Returns the value of attribute skipped
63 64 65 |
# File 'lib/rails_doctor/models.rb', line 63 def skipped @skipped end |
#stderr ⇒ Object
Returns the value of attribute stderr
63 64 65 |
# File 'lib/rails_doctor/models.rb', line 63 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout
63 64 65 |
# File 'lib/rails_doctor/models.rb', line 63 def stdout @stdout end |
Instance Method Details
#to_h(include_raw: false) ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/rails_doctor/models.rb', line 83 def to_h(include_raw: false) hash = { name: name, available: available, skipped: skipped, command: command, exit_status: exit_status, duration_ms: duration_ms, skip_reason: skip_reason, metadata: }.compact if include_raw hash[:stdout] = stdout hash[:stderr] = stderr end hash end |