Class: Skyfall::Jetstream::AccountMessage
- Defined in:
- lib/skyfall/jetstream/account_message.rb
Instance Attribute Summary
Attributes inherited from Message
Instance Method Summary collapse
- #active? ⇒ Boolean
-
#initialize(json) ⇒ AccountMessage
constructor
A new instance of AccountMessage.
- #status ⇒ Object
Methods inherited from Message
new, #operations, #time, #unknown?
Constructor Details
#initialize(json) ⇒ AccountMessage
Returns a new instance of AccountMessage.
6 7 8 9 |
# File 'lib/skyfall/jetstream/account_message.rb', line 6 def initialize(json) raise DecodeError.new("Missing event details") if json['account'].nil? super end |
Instance Method Details
#active? ⇒ Boolean
11 12 13 |
# File 'lib/skyfall/jetstream/account_message.rb', line 11 def active? @json['account']['active'] end |
#status ⇒ Object
15 16 17 |
# File 'lib/skyfall/jetstream/account_message.rb', line 15 def status @json['account']['status']&.to_sym end |