Module: IPLogic

Defined in:
lib/iplogic.rb,
lib/iplogic/ip.rb,
lib/iplogic/cidr.rb

Defined Under Namespace

Classes: CIDR, IP

Constant Summary collapse

VERSION =
'0.1.3'
LIB =
File.expand_path(File.dirname(__FILE__))

Instance Method Summary collapse

Instance Method Details

#CIDR(*args) ⇒ Object



124
125
126
127
128
# File 'lib/iplogic/cidr.rb', line 124

def CIDR(*args)
  return CIDR if args.empty?

  CIDR.wrap(*args)
end

#IP(*args) ⇒ Object



149
150
151
152
# File 'lib/iplogic/ip.rb', line 149

def IP(*args)
  return IP if args.empty?
  IP.wrap(args.first)
end