Class: Finance::FIX
- Inherits:
-
Object
- Object
- Finance::FIX
- Defined in:
- lib/finance-fix.rb
Overview
Finance::FIX - Parse FIX protocol messages
Constant Summary collapse
- VERSION =
'0.0.1'
Instance Method Summary collapse
- #new {|_self| ... } ⇒ Object
-
#parse(msg) ⇒ Object
Parse “message”, returning array of FIX message nodes, broken down in arrays of keys and values.
Instance Method Details
#new {|_self| ... } ⇒ Object
6 7 8 |
# File 'lib/finance-fix.rb', line 6 def new yield self if block_given? end |
#parse(msg) ⇒ Object
Parse “message”, returning array of FIX message nodes, broken down in arrays of keys and values.
12 13 14 |
# File 'lib/finance-fix.rb', line 12 def parse(msg) msg.split(/\x01/).collect { |pair| pair.split(/=/) } # Split on "SOH then "=" end |