Class: Dtn::Messages::MessageWithSimpleParser
- Inherits:
-
Dtn::Message
- Object
- OpenStruct
- Dtn::Message
- Dtn::Messages::MessageWithSimpleParser
- Defined in:
- lib/dtn/messages/message_with_simple_parser.rb
Overview
Lookup Message abstraction
Direct Known Subclasses
Bar::Base, Catalog::ListedMarkets, Catalog::SecurityTypes, Catalog::TradeConditions, Historical::DailyWeeklyMonthly, Historical::Interval, Historical::Tick, Level2::Level2Update, Level2::MarketMakerName, News::Base, Quote::Level1, Quote::Level1Fundamental, Quote::Level1News, Quote::Level1Regional, Quote::Level1Summary, Quote::Level1Update, Symbol::Base, System::ClientStats, System::CustomerInfo, System::EndOfMessageCharacters, System::NoDataCharacters, System::Stats, System::SymbolNotFound
Class Method Summary collapse
Instance Method Summary collapse
-
#termination? ⇒ Boolean
After receiving termination Message Request will be marked as finished and #each method successfully finalize the iteration.
Methods inherited from Dtn::Message
Class Method Details
.parse(line:, request: nil) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/dtn/messages/message_with_simple_parser.rb', line 8 def parse(line:, request: nil, **) values = line.split(",") new.tap do |n| apply_values instance: n, attributes: fields, values: values if respond_to?(:parse_dynamic_fields) parse_dynamic_fields(instance: n, values: values[(fields.size)..], request: request) end n.after_initialization if n.respond_to?(:after_initialization) end end |
Instance Method Details
#termination? ⇒ Boolean
After receiving termination Message Request will be marked as finished and #each method successfully finalize the iteration
33 34 35 |
# File 'lib/dtn/messages/message_with_simple_parser.rb', line 33 def termination? false end |