Class: Dtn::Messages::Quote::Level1News

Inherits:
MessageWithSimpleParser show all
Defined in:
lib/dtn/messages/quote/level1_news.rb

Overview

Streaming level1 news update.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from MessageWithSimpleParser

parse, #termination?

Methods inherited from Dtn::Message

#callback_name, callback_name, parse

Class Method Details

.fieldsObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/dtn/messages/quote/level1_news.rb', line 9

def fields
  @fields ||= {
    _skip: :nil,
    distributor: :to_s,
    story_id: :to_i,
    symbols_list: :to_s,
    story_datetime: :to_datetime,
    headline: :to_s
  }
end

Instance Method Details

#after_initializationObject



21
22
23
# File 'lib/dtn/messages/quote/level1_news.rb', line 21

def after_initialization
  self.symbols_list = symbols_list.to_s.split(":").delete_if(&:blank?).uniq
end