Class: RakeAudit::TaskExecutionRecord
- Inherits:
-
Struct
- Object
- Struct
- RakeAudit::TaskExecutionRecord
- Defined in:
- lib/rake_audit/task_execution_record.rb
Overview
Immutable data transfer object describing a single Rake task execution.
This Struct is the serialization boundary used by every storage adapter: adapters must rely on #to_h and never reach into internal state directly.
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#duration_ms ⇒ Object
Returns the value of attribute duration_ms.
-
#error_class ⇒ Object
Returns the value of attribute error_class.
-
#error_message ⇒ Object
Returns the value of attribute error_message.
-
#finished_at ⇒ Object
Returns the value of attribute finished_at.
-
#hostname ⇒ Object
Returns the value of attribute hostname.
-
#pid ⇒ Object
Returns the value of attribute pid.
-
#rails_env ⇒ Object
Returns the value of attribute rails_env.
-
#ruby_version ⇒ Object
Returns the value of attribute ruby_version.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
-
#status ⇒ Object
Returns the value of attribute status.
-
#task_name ⇒ Object
Returns the value of attribute task_name.
Instance Method Summary collapse
-
#to_h ⇒ Hash{Symbol=>Object}
The canonical, adapter-facing serialization of this record.
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments
8 9 10 |
# File 'lib/rake_audit/task_execution_record.rb', line 8 def arguments @arguments end |
#duration_ms ⇒ Object
Returns the value of attribute duration_ms
8 9 10 |
# File 'lib/rake_audit/task_execution_record.rb', line 8 def duration_ms @duration_ms end |
#error_class ⇒ Object
Returns the value of attribute error_class
8 9 10 |
# File 'lib/rake_audit/task_execution_record.rb', line 8 def error_class @error_class end |
#error_message ⇒ Object
Returns the value of attribute error_message
8 9 10 |
# File 'lib/rake_audit/task_execution_record.rb', line 8 def @error_message end |
#finished_at ⇒ Object
Returns the value of attribute finished_at
8 9 10 |
# File 'lib/rake_audit/task_execution_record.rb', line 8 def finished_at @finished_at end |
#hostname ⇒ Object
Returns the value of attribute hostname
8 9 10 |
# File 'lib/rake_audit/task_execution_record.rb', line 8 def hostname @hostname end |
#pid ⇒ Object
Returns the value of attribute pid
8 9 10 |
# File 'lib/rake_audit/task_execution_record.rb', line 8 def pid @pid end |
#rails_env ⇒ Object
Returns the value of attribute rails_env
8 9 10 |
# File 'lib/rake_audit/task_execution_record.rb', line 8 def rails_env @rails_env end |
#ruby_version ⇒ Object
Returns the value of attribute ruby_version
8 9 10 |
# File 'lib/rake_audit/task_execution_record.rb', line 8 def ruby_version @ruby_version end |
#started_at ⇒ Object
Returns the value of attribute started_at
8 9 10 |
# File 'lib/rake_audit/task_execution_record.rb', line 8 def started_at @started_at end |
#status ⇒ Object
Returns the value of attribute status
8 9 10 |
# File 'lib/rake_audit/task_execution_record.rb', line 8 def status @status end |
#task_name ⇒ Object
Returns the value of attribute task_name
8 9 10 |
# File 'lib/rake_audit/task_execution_record.rb', line 8 def task_name @task_name end |
Instance Method Details
#to_h ⇒ Hash{Symbol=>Object}
The canonical, adapter-facing serialization of this record.
Always returns a plain Hash containing all 12 fields, regardless of how the record was constructed. Adapters depend on this exact contract.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/rake_audit/task_execution_record.rb', line 29 def to_h { task_name: task_name, arguments: arguments, started_at: started_at, finished_at: finished_at, duration_ms: duration_ms, status: status, error_class: error_class, error_message: , hostname: hostname, pid: pid, ruby_version: ruby_version, rails_env: rails_env } end |