lib/profitbricks/ip_block.rb in profitbricks-0.0.5 vs lib/profitbricks/ip_block.rb in profitbricks-0.4.0
- old
+ new
@@ -1,9 +1,9 @@
module Profitbricks
class IpBlock < Profitbricks::Model
attr_reader :ips
- def initialize(hash)
+ def initialize(hash, parent=nil)
if hash[:public_ips]
@ips = [hash.delete(:public_ips)].flatten.compact.collect { |ip| ip[:ip] }
end
super(hash)
@ips = [@ips] if @ips.class != Array
\ No newline at end of file