Class: Skyfall::Firehose::InfoMessage

Inherits:
Message
  • Object
show all
Defined in:
lib/skyfall/firehose/info_message.rb

Constant Summary collapse

OUTDATED_CURSOR =
"OutdatedCursor"

Instance Attribute Summary collapse

Attributes inherited from Message

#data_object, #did, #seq, #type, #type_object

Instance Method Summary collapse

Methods inherited from Message

#inspect, new, #operations, #time

Constructor Details

#initialize(type_object, data_object) ⇒ InfoMessage

Returns a new instance of InfoMessage.



9
10
11
12
13
14
# File 'lib/skyfall/firehose/info_message.rb', line 9

def initialize(type_object, data_object)
  super

  @name = @data_object['name']
  @message = @data_object['message']
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



5
6
7
# File 'lib/skyfall/firehose/info_message.rb', line 5

def message
  @message
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/skyfall/firehose/info_message.rb', line 5

def name
  @name
end

Instance Method Details

#inspectable_variablesObject



20
21
22
# File 'lib/skyfall/firehose/info_message.rb', line 20

def inspectable_variables
  super - [:@did, :@seq]
end

#to_sObject



16
17
18
# File 'lib/skyfall/firehose/info_message.rb', line 16

def to_s
  (@name || "InfoMessage") + (@message ? ": #{@message}" : "")
end