Method: Cosmos::PreidentifiedProtocol#initialize
- Defined in:
- lib/cosmos/interfaces/protocols/preidentified_protocol.rb
#initialize(sync_pattern = nil, max_length = nil, mode = 4, allow_empty_data = nil) ⇒ PreidentifiedProtocol
Returns a new instance of PreidentifiedProtocol.
31 32 33 34 35 36 |
# File 'lib/cosmos/interfaces/protocols/preidentified_protocol.rb', line 31 def initialize(sync_pattern = nil, max_length = nil, mode = 4, allow_empty_data = nil) super(0, sync_pattern, false, allow_empty_data) @max_length = ConfigParser.handle_nil(max_length) @max_length = Integer(@max_length) if @max_length @mode = Integer(mode) end |