module Convection::Model::Mixin::Protocol
Map IP protocol names to numbers
Public Class Methods
lookup(value)
click to toggle source
# File lib/convection/model/mixin/protocol.rb, line 11 def lookup(value) case value when :any then -1 when :icmp then 1 when :tcp then 6 when :udp then 17 else value end end
Public Instance Methods
protocol_property(name = :protocol, property_name = 'IpProtocol')
click to toggle source
# File lib/convection/model/mixin/protocol.rb, line 22 def protocol_property(name = :protocol, property_name = 'IpProtocol') property(name, property_name, :transform => Mixin::Protocol.method(:lookup)) end