Sha256: c8dccb1d25f75e823f0d2cb559babfd5a653c1a8943b32b16757308c99c56109
Contents?: true
Size: 649 Bytes
Versions: 1
Compression:
Stored size: 649 Bytes
Contents
# frozen_string_literal: true require 'pio/open_flow10' require 'pio/open_flow13' module Pio module OpenFlow # Collection class of OpenFlow message parser class class Parser def self.find_by_type!(type) message_class = [Hello, Error, Echo::Request, Echo::Reply, Features::Request, Features::Reply, PacketIn, PacketOut, FlowMod, PortStatus, Stats::Request, Stats::Reply, Barrier::Request, Barrier::Reply] message_class.each_with_object({}) do |each, hash| hash[each.type] = each end.fetch(type) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pio-0.30.2 | lib/pio/open_flow/parser.rb |