Class: Siding::Staleness::Events::Event
- Inherits:
-
Struct
- Object
- Struct
- Siding::Staleness::Events::Event
- Defined in:
- lib/siding/staleness.rb
Instance Attribute Summary collapse
-
#at ⇒ Object
Returns the value of attribute at.
-
#developer_wait ⇒ Object
Returns the value of attribute developer_wait.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#resolution ⇒ Object
Returns the value of attribute resolution.
-
#trigger_paths ⇒ Object
Returns the value of attribute trigger_paths.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#at ⇒ Object
Returns the value of attribute at
114 115 116 |
# File 'lib/siding/staleness.rb', line 114 def at @at end |
#developer_wait ⇒ Object
Returns the value of attribute developer_wait
114 115 116 |
# File 'lib/siding/staleness.rb', line 114 def developer_wait @developer_wait end |
#reason ⇒ Object
Returns the value of attribute reason
114 115 116 |
# File 'lib/siding/staleness.rb', line 114 def reason @reason end |
#resolution ⇒ Object
Returns the value of attribute resolution
114 115 116 |
# File 'lib/siding/staleness.rb', line 114 def resolution @resolution end |
#trigger_paths ⇒ Object
Returns the value of attribute trigger_paths
114 115 116 |
# File 'lib/siding/staleness.rb', line 114 def trigger_paths @trigger_paths end |
Class Method Details
.from_h(hash) ⇒ Object
126 127 128 129 130 131 132 |
# File 'lib/siding/staleness.rb', line 126 def self.from_h(hash) new(at: Time.iso8601(hash["at"]), reason: hash["reason"], trigger_paths: Array(hash["trigger_paths"]), resolution: hash["resolution"], developer_wait: hash["developer_wait"]) rescue ArgumentError, TypeError nil end |
Instance Method Details
#to_h ⇒ Object
116 117 118 119 120 121 122 123 124 |
# File 'lib/siding/staleness.rb', line 116 def to_h { "at" => at.iso8601(3), "reason" => reason.to_s, "trigger_paths" => trigger_paths, "resolution" => resolution, "developer_wait" => developer_wait } end |