Class: CircuitBreaker::History::Entry
- Inherits:
-
Object
- Object
- CircuitBreaker::History::Entry
- Defined in:
- lib/circuit_breaker/history.rb
Instance Attribute Summary collapse
-
#actor_id ⇒ Object
readonly
Returns the value of attribute actor_id.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type:, details:, actor_id: nil) ⇒ Entry
constructor
A new instance of Entry.
- #to_h ⇒ Object
Constructor Details
#initialize(type:, details:, actor_id: nil) ⇒ Entry
Returns a new instance of Entry.
6 7 8 9 10 11 |
# File 'lib/circuit_breaker/history.rb', line 6 def initialize(type:, details:, actor_id: nil) = Time.now @type = type @details = details @actor_id = actor_id end |
Instance Attribute Details
#actor_id ⇒ Object (readonly)
Returns the value of attribute actor_id.
4 5 6 |
# File 'lib/circuit_breaker/history.rb', line 4 def actor_id @actor_id end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
4 5 6 |
# File 'lib/circuit_breaker/history.rb', line 4 def details @details end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
4 5 6 |
# File 'lib/circuit_breaker/history.rb', line 4 def end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/circuit_breaker/history.rb', line 4 def type @type end |
Instance Method Details
#to_h ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/circuit_breaker/history.rb', line 13 def to_h { timestamp: , type: type, details: details, actor_id: actor_id } end |