Sha256: bfbb3ce67e2e49b4513afe88d9ea6bcfc2659cbe07819cb925fddcf7be1509b6

Contents?: true

Size: 376 Bytes

Versions: 100

Compression:

Stored size: 376 Bytes

Contents

require 'netaddr'

module Convection
  module Model
    module Mixin
      ##
      # Sanitized CIDR IP notation
      ##
      module CIDRBlock
        def cidr_property(name = :network, property_name = 'CidrBlock')
          property(name, property_name,
                   :transform => proc { |*args| NetAddr::CIDR.create(*args) })
        end
      end
    end
  end
end

Version data entries

100 entries across 100 versions & 1 rubygems

Version Path
convection-2.3.1 lib/convection/model/mixin/cidr_block.rb
convection-2.3.0 lib/convection/model/mixin/cidr_block.rb
convection-2.2.29 lib/convection/model/mixin/cidr_block.rb
convection-2.2.28.pre.beta.2 lib/convection/model/mixin/cidr_block.rb
convection-2.2.28.pre.beta.1 lib/convection/model/mixin/cidr_block.rb
convection-2.2.27 lib/convection/model/mixin/cidr_block.rb
convection-2.2.26 lib/convection/model/mixin/cidr_block.rb
convection-2.2.25 lib/convection/model/mixin/cidr_block.rb
convection-2.2.24 lib/convection/model/mixin/cidr_block.rb
convection-2.2.23 lib/convection/model/mixin/cidr_block.rb
convection-2.2.22 lib/convection/model/mixin/cidr_block.rb
convection-2.2.21 lib/convection/model/mixin/cidr_block.rb
convection-2.2.20 lib/convection/model/mixin/cidr_block.rb
convection-2.2.19 lib/convection/model/mixin/cidr_block.rb
convection-2.2.18 lib/convection/model/mixin/cidr_block.rb
convection-2.2.17 lib/convection/model/mixin/cidr_block.rb
convection-2.2.16 lib/convection/model/mixin/cidr_block.rb
convection-2.2.15 lib/convection/model/mixin/cidr_block.rb
convection-2.2.14 lib/convection/model/mixin/cidr_block.rb
convection-2.2.13 lib/convection/model/mixin/cidr_block.rb