class YAHL7::V2::Scanner

This class is responsible for scanning the HL7 messages out of a given source. This source can be either a string or an IO.

Attributes

scanner[R]

Public Class Methods

new(src) click to toggle source
# File lib/yahl7/v2/scanner.rb, line 19
def initialize(src)
  case src
  when ::String then @scanner = YAHL7::V2::Scanner::String.new(src)
  when ::IO, ::File, ::StringIO then @scanner = YAHL7::V2::Scanner::IO.new(src)
  else raise 'Unknown source type'
  end
end