Class: Dtn::Messages::Symbol::Base

Inherits:
MessageWithSimpleParser show all
Defined in:
lib/dtn/messages/symbol/base.rb

Overview

Base lookup

Direct Known Subclasses

ByFilter, ByNaic, BySic

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/symbol/base.rb', line 9

def fields
  @fields ||= {
    request_id: :to_i,
    code_id => :to_i,
    symbol: :to_s,
    listed_market_id: :to_i,
    security_type_id: :to_i,
    description: :to_s
  }.delete_if { |k, _| !k }.freeze
end

Instance Method Details

#listed_marketObject



25
26
27
# File 'lib/dtn/messages/symbol/base.rb', line 25

def listed_market
  Dtn.listed_markets_catalog[listed_market_id]
end

#security_typeObject



29
30
31
# File 'lib/dtn/messages/symbol/base.rb', line 29

def security_type
  Dtn.security_types_catalog[security_type_id]
end