class MacAddr
  def to_s
    return @mac_parts.join(":")
  end

  def initialize(mac)
    if mac.length < 17
      fail "MAC is too short; make sure colons are in place"
    end

    @mac_parts = mac.split(':')
  end

  def [](index)
    return @mac_parts[index]
  end
end