Class: LensProtocol::OMA::Type::R
- Inherits:
-
Base
- Object
- Base
- LensProtocol::OMA::Type::R
show all
- Defined in:
- lib/lens_protocol/oma/type/r.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
12
13
14
|
# File 'lib/lens_protocol/oma/type/r.rb', line 12
def format _record, _message
[] end
|
#parse(line, message) ⇒ Object
5
6
7
8
9
10
|
# File 'lib/lens_protocol/oma/type/r.rb', line 5
def parse line, message
label, values = label_and_values line
trcfmt = message.context(:last_trcfmt) or raise ParsingError.new('Could not found a corresponding TRCFMT record', line)
values = Trcfmt.number(trcfmt) == 1 ? values.map(&:to_i) : values
message.add_record_side_values(label, Trcfmt.side_pos(trcfmt), values)
end
|