class Traffic
Attributes
from[RW]
ingress[RW]
port_range[RW]
to[RW]
Public Class Methods
grouped(traffic_list)
click to toggle source
# File lib/ec2/traffic.rb, line 27 def self.grouped(traffic_list) t = traffic_list.first port_range = traffic_list.collect(&:port_range).uniq.join(',') Traffic.new(t.ingress, t.from, t.to, port_range) end
new(ingress, from, to, port_range)
click to toggle source
# File lib/ec2/traffic.rb, line 4 def initialize(ingress, from, to, port_range) @ingress = ingress @from = from @to = to @port_range = port_range end
Public Instance Methods
copy(from, to)
click to toggle source
# File lib/ec2/traffic.rb, line 11 def copy(from, to) Traffic.new(@ingress, from, to, @port_range) end
eql?(other)
click to toggle source
# File lib/ec2/traffic.rb, line 15 def eql?(other) if @ingress == other.ingress @from == other.from && @to == other.to && @port_range == other.port_range else @from == other.to && @to == other.from && @port_range == other.port_range end end
hash()
click to toggle source
# File lib/ec2/traffic.rb, line 23 def hash @from.hash + @to.hash + @port_range.hash end