Class CLibIPAddr
In: lib/svengali/util.rb
Parent: Object

module CloudUtil

Methods

dup   inc!   new   to_s  

Public Class methods

[Source]

# File lib/svengali/util.rb, line 8
  def initialize(ipaddr_str)
    @ipaddr = ipaddr_str
  end

Public Instance methods

[Source]

# File lib/svengali/util.rb, line 24
  def dup()
    return CLibIPAddr.new(@ipaddr)
  end

[Source]

# File lib/svengali/util.rb, line 12
  def inc!
    splited_arr = @ipaddr.split(".")
    last_octet = splited_arr[3].to_i
    #remove last octet
    splited_arr.pop()
    @ipaddr = splited_arr.join(".") + "." + (last_octet+1).to_s
  end

[Source]

# File lib/svengali/util.rb, line 20
  def to_s
    return @ipaddr
  end

[Validate]