Class: SimpleConnect::Responses::VerifyResponse::EventFlow
- Inherits:
-
Object
- Object
- SimpleConnect::Responses::VerifyResponse::EventFlow
- Defined in:
- lib/simple_connect/responses/verify_response.rb
Overview
Per-event-key flow state. Mirrors one element of the server’s ‘event_flows` array.
Defined Under Namespace
Classes: Template
Instance Attribute Summary collapse
-
#event_key ⇒ Object
readonly
Returns the value of attribute event_key.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
- #configured? ⇒ Boolean
- #enabled? ⇒ Boolean
-
#initialize(json) ⇒ EventFlow
constructor
A new instance of EventFlow.
- #needs_attention? ⇒ Boolean
Constructor Details
#initialize(json) ⇒ EventFlow
Returns a new instance of EventFlow.
38 39 40 41 42 43 44 45 |
# File 'lib/simple_connect/responses/verify_response.rb', line 38 def initialize(json) json = {} unless json.is_a?(Hash) @event_key = json["event_key"] @state = json["state"] @enabled = json["enabled"] == true @needs_attention = json["needs_attention"] == true @template = json["template"] ? Template.new(json["template"]) : nil end |
Instance Attribute Details
#event_key ⇒ Object (readonly)
Returns the value of attribute event_key.
36 37 38 |
# File 'lib/simple_connect/responses/verify_response.rb', line 36 def event_key @event_key end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
36 37 38 |
# File 'lib/simple_connect/responses/verify_response.rb', line 36 def state @state end |
#template ⇒ Object (readonly)
Returns the value of attribute template.
36 37 38 |
# File 'lib/simple_connect/responses/verify_response.rb', line 36 def template @template end |
Instance Method Details
#configured? ⇒ Boolean
55 56 57 |
# File 'lib/simple_connect/responses/verify_response.rb', line 55 def configured? !@template.nil? end |
#enabled? ⇒ Boolean
47 48 49 |
# File 'lib/simple_connect/responses/verify_response.rb', line 47 def enabled? @enabled end |
#needs_attention? ⇒ Boolean
51 52 53 |
# File 'lib/simple_connect/responses/verify_response.rb', line 51 def needs_attention? @needs_attention end |